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.

906 MATCH FILES<br />

Variable Names. You can rename variables in each input file before combining the files using<br />

the RENAME subcommand. This permits you to combine variables that are the same but<br />

whose names differ in different input files, or to separate variables that are different but have<br />

the same name.<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 subcommands to create a variable that<br />

flags 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 order,<br />

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, each of which specifies a file to<br />

be matched. In addition, BY is required to specify the key variables for nonparallel matches.<br />

Both BY and TABLE are required to match table-lookup files.<br />

• All variables from all input files are included in the new working file unless DROP or<br />

KEEP is specified.<br />

Subcommand Order<br />

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

apply.<br />

• Any BY, FIRST, LAST, KEEP, DROP, and MAP subcommands must follow all the TABLE,<br />

FILE, RENAME, and IN subcommands..<br />

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

• RENAME can be repeated after each FILE or TABLE subcommand and applies only to<br />

variables in the file named on the immediately preceding FILE or TABLE.<br />

• IN can be used only for a nonparallel match or for a table lookup. (Thus, IN can be used<br />

only if BY is specified.)<br />

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

BY is used, all files must be sorted in ascending order of the key variables named on BY.<br />

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

Operations<br />

• MATCH FILES reads all files named on FILE or TABLE and builds a new working data file<br />

that replaces any working file created earlier in the session.<br />

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

files, including variable names, labels, print and write formats, and missing-value indi-

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

Saved successfully!

Ooh no, something went wrong!