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.

420 DATA LIST<br />

• RECORDS indicates there are three records for each case in the data.<br />

• YRHIRED is the only variable defined on the first record. The FORTRAN-like format specification<br />

T14 means tab over 14 columns. Thus, YRHIRED begins in column 14 and has<br />

format F2.0.<br />

• The second record is skipped. Because the record sequence numbers are not specified, a<br />

slash must be used to skip the second record.<br />

• NAME is the only variable defined for the third record. NAME begins in column 25 and is<br />

a string variable with a width of 24 characters (format A24).<br />

Example<br />

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

/YRHIRED NAME (T14,F2.0 / / T25,A24).<br />

• This command is equivalent to the one in the previous example. YRHIRED is located on<br />

the first record, and NAME is located on the third record.<br />

• The slashes that indicate the second and third records are specified within the format specifications.<br />

The format specifications follow the complete variable list.<br />

SKIP Subcommand<br />

SKIP skips the first n records of the data file.<br />

Example<br />

DATA LIST LIST SKIP=2 /numvar.<br />

BEGIN DATA<br />

Some text describing the file<br />

followed by some more text<br />

1<br />

2<br />

3<br />

END DATA.<br />

END Subcommand<br />

END provides control of end-of-file processing by specifying a variable that is set to a value<br />

of 0 until the end of the data file is encountered, at which point the variable is set to 1. The<br />

values of all variables named on DATA LIST are left unchanged. The logical variable created<br />

with END can then be used on DO IF and LOOP commands to invoke special processing after<br />

all the cases from a particular input file have been built.<br />

• DATA LIST and the entire set of commands used to define the cases must be enclosed<br />

within an INPUT PROGRAM—END INPUT PROGRAM structure. The END FILE command<br />

must also be used to signal the end of case generation.<br />

• END can be used only with fixed-format data. An error is generated if the END subcommand<br />

is used with FREE or LIST.

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

Saved successfully!

Ooh no, something went wrong!