Overview (APPLY DICTIONARY command)

APPLY DICTIONARY can apply variable and file-based dictionary information from an external IBM® SPSS® Statistics data file or open dataset to the current active dataset. Variable-based dictionary information in the current active dataset can be applied to other variables in the current active dataset.

  • The applied variable information includes variable and value labels, missing-value flags, alignments, variable print and write formats, measurement levels, and widths.
  • The applied file information includes variable and multiple response sets, documents, file label, and weight.
  • APPLY DICTIONARY can apply information selectively to variables and can apply selective file-based dictionary information.
  • Individual variable attributes can be applied to individual and multiple variables of the same type (strings of the same character length or numeric).
  • APPLY DICTIONARY can add new variables but cannot remove variables, change data, or change a variable’s name or type.
  • Undefined (empty) attributes in the source dataset do not overwrite defined attributes in the active dataset.

Basic Specification

The basic specification is the FROM subcommand and the name of an external IBM SPSS Statistics data file or open dataset. The file specification should be enclosed in quotation marks.

Subcommand Order

The subcommands can be specified in any order.

Syntax Rules

  • The file containing the dictionary information to be applied (the source file) must be an external IBM SPSS Statistics data file or a currently open dataset.
  • The file to which the dictionary information is applied (the target file) must be the active dataset. You cannot specify another file.
  • If a subcommand is issued more than once, APPLY DICTIONARY will ignore all but the last instance of the subcommand.
  • Equals signs displayed in the syntax chart and in the examples presented here are required elements; they are not optional.

Matching Variable Type

APPLY DICTIONARY considers two variables to have a matching variable type if:

  • Both variables are numeric. This includes all numeric, currency, and date formats.
  • Both variables are string (alphanumeric).