VARINFO Subcommand (CODEBOOK command)

The optional VARINFO subcommand allows you to control the variable information included in the results.

  • By default, all available variable information, with the exception of reserved system attributes, is included.
  • If you include the VARINFO subcommand, it should be followed by one or more of the available keywords that indicate the dictionary information to include.

The available options are:

POSITION. File position. An integer that represents the position of the variable in file order. This is not available for multiple response sets.

LABEL. Defined variable label. See the topic VARIABLE LABELS for more information.

TYPE. Fundamental data type. This is either Numeric, String, or Multiple Response Set.

FORMAT. Print format. The display format for the variable, such as A4, F8.2, or DATE11. See the topic Variable Types and Formats for more information. This is not available for multiple response sets.

MEASURE. Measurement level. The possible values are Nominal, Ordinal, Scale, and Unknown. The value displayed is the measurement level stored in the dictionary and is not affected by any temporary measurement level override specified by the CODEBOOK command. See the topic VARIABLE LEVEL for more information. This is not available for multiple response sets. (Note: The measurement level for numeric variables may be "unknown" prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables. The measurement level for string variables is always known.)

ROLE. Role when using predefined roles in dialogs. Some dialogs support predefined roles that can be used to pre-select variables for analysis. See the topic Overview (VARIABLE ROLE command) for more information.

ATTRIBUTES. User-defined custom variable attributes. Output includes both the names and values for any custom variable attributes associated with each variable. See the topic VARIABLE ATTRIBUTE for more information. This is not available for multiple response sets.

VALUELABELS. Defined value labels. If the STATISTICS subcommand includes COUNT or PERCENT, defined value labels are included in the output even if this keyword is omitted from the VARINFO subcommand. For information on defining value labels, see VALUE LABELS.

MISSING. User-defined missing values. If the STATISTICS subcommand includes COUNT or PERCENT, defined value labels are included in the output even if this keyword is omitted from the VARINFO subcommand. For information on defining missing values, see MISSING VALUES. This is not available for multiple response sets.

RESERVEDATTRIBUTES. Reserved system variable attributes. You can display system attributes, but you should not alter them. System attribute names start with a dollar sign ($) . Non-display attributes, with names that begin with either "@" or "$@", are not included. Output includes both the names and values for any system attributes associated with each variable. This is not available for multiple response sets.

Example

CODEBOOK
  /VARINFO LABEL MEASURE VALUELABELS MISSING.