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.

138 APPLY DICTIONARY<br />

• FROM is required.<br />

• Only one SPSS-format data file (including the working file) can be specified on FROM.<br />

• The working file can be specified in the FROM subcommand by using an asterisk as the<br />

value. File-based dictionary information (FILEINFO subcommand) is ignored when the<br />

working file is used as the source file.<br />

Example<br />

APPLY DICTIONARY FROM “lastmonth.sav”.<br />

• This will apply variable information from lastmonth.sav to matching variables in the<br />

working data file.<br />

• The default variable information applied from the source file includes variable labels,<br />

value labels, missing values, level of measurement, alignment, column width (for Data<br />

Editor display), and print and write formats.<br />

• If weighting is on in the source data file and a matching weight variable exists in the<br />

working (target) data file, weighting by that variable is turned on in the working data file.<br />

No other file information (documents, file label, multiple response sets) from the source<br />

file is applied to the working data file.<br />

NEWVARS Subcommand<br />

NEWVARS is required to create new variables in the working (target) data file.<br />

Example<br />

APPLY DICTIONARY FROM “lastmonth.sav”<br />

/NEWVARS.<br />

• For a new, blank working data file, all variables with all their variable definition attributes<br />

are copied from the source data file, creating a new data file with an identical set of variables<br />

(but no data values).<br />

• For a working data file that contains any variables, variable definition attributes from the<br />

source data file are applied to the matching variables in the working (target) data file. If<br />

the source data file contains any variables that are not present in the working data file<br />

(determined by variable name), these variables are created in the working data file.<br />

SOURCE and TARGET Subcommands<br />

The SOURCE subcommand is used to specify variables in the source file from which to apply<br />

variable definition attributes. The TARGET subcommand is used to specify variables in the<br />

working data file to which to apply variable definition attributes.<br />

• All variables specified in the SOURCE subcommand must exist in the source file.<br />

• If the TARGET subcommand is specified without the SOURCE subcommand, all variables<br />

specified must exist in the source file.<br />

• If the NEWVARS subcommand is specified, variables that are specified in the SOURCE<br />

subcommand that exist in the source file but not in the target file will be created in the

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

Saved successfully!

Ooh no, something went wrong!