27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DATA LIST 417<br />

LIST Freefield data with one case on each record. The variables are recorded in freefield<br />

format as described for the keyword FREE except that the variables for each case<br />

must be recorded on one record.<br />

• FIXED, FREE, or LIST must be separated from other DATA LIST subcommands by at least<br />

one blank or comma.<br />

• FIXED, FREE, or LIST must precede the first slash, which signals the beginning of data<br />

definition.<br />

• For fixed-format data, you can use column-style or FORTRAN-like formats, or a combination<br />

of both. For freefield data, you can use only FORTRAN-like formats.<br />

• For fixed-format data, the program reads values according to the column locations<br />

specified or implied by the FORTRAN-like format. Values in the data do not have to be<br />

in the same order as the variables named on DATA LIST and do not have to be separated by<br />

a space or column.<br />

• For freefield data, the program reads values sequentially in the order in which the<br />

variables are named on DATA LIST. Values in the data must be in the order in which the<br />

variables are named on DATA LIST and must be separated by at least one valid delimiter.<br />

• For freefield data, multiple blank spaces can be used to indicate missing information only<br />

if a blank space is explicitly specified as the delimiter. In general, it is better to use<br />

multiple non-blank delimiters (for example, two commas with no intervening space) to<br />

specify missing data.<br />

• In freefield format, a value cannot be split across records.<br />

Example<br />

* Data in fixed format.<br />

DATA LIST FILE=HUBDATA FIXED RECORDS=3<br />

/1 YRHIRED 14-15 DEPT 19 SEX 20.<br />

• FIXED indicates explicitly that the HUBDATA file is in fixed format. Because FIXED is the<br />

default, the keyword FIXED could have been omitted.<br />

• Variable definition begins after the slash. Column locations are specified after each variable.<br />

Since formats are not specified, the default numeric format is used. Variable widths<br />

are determined by the column specifications: YRHIRED is two characters wide, and DEPT<br />

and SEX are each one character wide.<br />

Example<br />

* Data in freefield format.<br />

DATA LIST FREE / POSTPOS NWINS.<br />

BEGIN DATA<br />

2, 19, 7, 5, 10, 25, 5, 17, 8, 11, 3,, 6, 8, 1, 29<br />

END DATA.<br />

• Data are inline, so FILE is omitted. The keyword FREE is used because data are in freefield<br />

format with multiple cases on a single record. Two variables, POSTPOS and NWINS, are<br />

defined. Since formats are not specified, both variables receive the default F8.2 format.<br />

• All of the data are recorded on one record. The first two values build the first case in the<br />

working data file. For the first case, POSTPOS has value 2 and NWINS has value 19. For

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!