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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

424 DATA LIST<br />

• With fixed format, column-style and FORTRAN-like specifications can be mixed on the<br />

same DATA LIST command.<br />

• Record location is indicated by a slash or a slash and record number before the names of<br />

the variables on that record. See the RECORDS subcommand on p. 418 for information<br />

on specifying record location.<br />

• The program ignores data in columns and on records that are not specified on DATA LIST.<br />

• In the data, values do not have to be separated by a space or comma.<br />

Example<br />

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

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

/2 SALARY 21-25.<br />

• The data are in fixed format (the default) and are read from the file HUBDATA.<br />

• Three variables, YRHIRED, DEPT, and SEX, are defined on the first record of the<br />

HUBDATA file. One variable, SALARY, is read from columns 21 through 25 on the second<br />

record. The total number of records per case is specified as 3 even though no variables<br />

are defined on the third record. The third record is simply skipped in data definition.<br />

Example<br />

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

/1 DEPT 19 SEX 20 YRHIRED 14-15 MOHIRED 12-13 HIRED 12-15<br />

/2 SALARY 21-25.<br />

• The first two defined variables are DEPT and SEX, located in columns 19 and 20 on record<br />

1. The next three variables, YRHIRED, MOHIRED, and HIRED, are also located on the first<br />

record.<br />

• YRHIRED is read from columns 14 and 15, MOHIRED from columns 12 and 13, and HIRED<br />

from columns 12 through 15. The variable HIRED is a four-column variable with the first<br />

two columns representing the month when an employee was hired (the same as<br />

MOHIRED) and the last two columns representing the year of employment (the same as<br />

YRHIRED).<br />

• The order of the variables in the dictionary is the order in which they are defined on DATA<br />

LIST, not their sequence in the HUBDATA file.<br />

Example<br />

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

/1 DEPT 19 SEX 20 MOHIRED YRHIRED 12-15<br />

/2 SALARY 21-25.<br />

• A single column specification follows MOHIRED and YRHIRED. DATA LIST divides the<br />

total number of columns specified equally between the two variables. Thus, each variable<br />

has a width of two columns.

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

Saved successfully!

Ooh no, something went wrong!