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.

UPDATE 1623<br />

Variable Flag. You can create a variable that indicates whether a case came from a particular<br />

input file using IN. You can use the FIRST or LAST subcommand to create a variable that flags<br />

the first or last case of a group of cases with the same value for the key variable.<br />

Variable Map. You can request a map showing all variables in the new working file, their<br />

order, and the input files from which they came using the MAP subcommand.<br />

Basic Specification<br />

The basic specification is two or more FILE subcommands and a BY subcommand.<br />

• The first FILE subcommand must specify the master file. All other FILE subcommands<br />

identify the transaction files.<br />

• BY specifies the key variables.<br />

• All files must be sorted in ascending order by the key variables.<br />

• By default, all variables from all input files are included in the new working file.<br />

Subcommand Order<br />

• The master file must be specified first.<br />

• RENAME and IN must immediately follow the FILE subcommand to which they apply.<br />

• BY must follow the FILE subcommands and any associated RENAME and IN subcommands.<br />

• MAP, DROP, and KEEP must be specified after all FILE and RENAME subcommands.<br />

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

• BY can be specified only once. However, multiple variables can be specified on BY. All<br />

files must be sorted in ascending order by the key variables named on BY.<br />

• The master file cannot contain duplicate values for the key variables.<br />

• RENAME can be repeated after each FILE subcommand and applies only to variables in the<br />

file named on the immediately preceding FILE subcommand.<br />

• MAP can be repeated as often as needed.<br />

Operations<br />

• UPDATE reads all input files named on FILE and builds a new working data file that<br />

replaces any working file created earlier in the session. The new working data file is built<br />

when the data are read by one of the procedure commands or the EXECUTE, SAVE, or<br />

SORT CASES command.<br />

• The new working data file contains complete dictionary information from the input files,<br />

including variable names, labels, print and write formats, and missing-value indicators.<br />

The new working data file also contains the documents from each input file, unless the<br />

DROP DOCUMENTS command is used.

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

Saved successfully!

Ooh no, something went wrong!