VARINFO Subcommand (APPLY DICTIONARY command)

VARINFO applies variable definition attributes from the source dataset to the matching variables in the active dataset. With the exception of VALLABELS, all keywords replace the variable definition attributes in the active dataset with the attributes from the matching variables in the source dataset.

ALIGNMENT. Applies variable alignment for Data Editor display. This setting affects alignment (left, right, center) only in the Data View display of the Data Editor.

ATTRIBUTES. Applies variable attributes defined by the VARIABLE ATTRIBUTE command. You can REPLACE or MERGE variable attributes.

FORMATS. Applies variable print and write formats. This is the same variable definition attribute that can be defined with the FORMATS command. This setting is primarily applicable only to numeric variables. For string variables, this affects only the formats if the source or target variable is AHEX format and the other is A format.

LEVEL. Applies variable measurement level (nominal, ordinal, scale). This is the same variable definition attribute that can be defined with the VARIABLE LEVEL command.

MISSING. Applies variable missing value definitions. Any existing defined missing values in the matching variables in the active dataset are deleted. This is the same variable definition attribute that can be defined with the MISSING VALUES command. Missing values definitions are not applied to string variables if the source variable contains missing values of a longer width than the defined width of the target variable.

ROLE. Applies role assignments. See the topic Overview (VARIABLE ROLE command) for more information.

VALLABELS. Applies value label definitions. Value labels are not applied to string variables if the source variable contains defined value labels for values longer than the defined width of the target variable. You can REPLACE or MERGE value labels. VALLABELS = REPLACE replaces any defined value labels from variable in the active dataset with the value labels from the matching variable in the source dataset. VALLABELS = MERGE merges defined value labels for matching variables. If the same value has a defined value label in both the source and active datasets, the value label in the active dataset is unchanged.

WIDTH. Display column width in the Data Editor. This affects only column width in Data View in the Data Editor. It has no affect on the defined width of the variable.

Example

APPLY DICTIONARY from “lastmonth.sav”
  /VARINFO LEVEL MISSING VALLABELS = MERGE.