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.

<strong>Syntax</strong> Rules<br />

FILE TYPE—END FILE TYPE 569<br />

• For mixed files, if the record types have different variables or if they have the same variables<br />

recorded in different locations, separate RECORD TYPE and DATA LIST commands<br />

are required for each record type.<br />

• For mixed files, the same variable name can be used on different DATA LIST commands,<br />

since each record type defines a separate case.<br />

• For mixed files, if the same variable is defined for more than one record type, the format<br />

type and length of the variable should be the same on all DATA LIST commands. The<br />

program refers to the first DATA LIST command that defines a variable for the print and<br />

write formats to include in the dictionary of the working data file.<br />

• For grouped and nested files, the variable names on each DATA LIST must be unique, since<br />

a case is built by combining all record types together into a single record.<br />

• For nested files, the order of the RECORD TYPE commands defines the hierarchical structure<br />

of the file. The first RECORD TYPE defines the highest-level record type, the next<br />

RECORD TYPE defines the next highest-level record, and so forth. The last RECORD<br />

TYPE command defines a case in the working data file. By default, variables from higherlevel<br />

records are spread to the lowest-level record.<br />

• For nested files, the SPREAD subcommand on RECORD TYPE can be used to spread the<br />

values in a record type only to the first case built from each record of that type. All other<br />

cases associated with that record are assigned the system-missing value for the variables<br />

defined on that type. See RECORD TYPE for more information.<br />

• String values specified on the RECORD TYPE command must be enclosed in apostrophes<br />

or quotation marks.<br />

Operations<br />

• For mixed file types, the program skips all records that are not specified on one of the<br />

RECORD TYPE commands.<br />

• If different variables are defined for different record types in mixed files, the variables are<br />

assigned the system-missing value for those record types on which they are not defined.<br />

• For nested files, the first record in the file should be the type specified on the first<br />

RECORD TYPE command—the highest level of the hierarchy. If the first record in the file<br />

is not the highest-level type, the program skips all records until it encounters a record of<br />

the highest-level type. If MISSING or DUPLICATE has been specified, these records may<br />

produce warning messages but will not be used to build a case in the working file.<br />

• When defining complex files, you are effectively building an input program and can use<br />

only commands that are allowed in the input state. See Appendix A for information on<br />

program states.

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

Saved successfully!

Ooh no, something went wrong!