Variable Names (DATA LIST command)
- Variable names must conform to variable-naming rules.
System variables (beginning with a $) cannot be defined on
DATA LIST
. See the topic Variable Names for more information. - The keyword
TO
can be used to generate names for consecutive variables in the data. Leading zeros in the number are preserved in the name. X1TO
X100 and X001TO
X100 both generate 100 variable names, but the first 99 names are not the same in the two lists. X01TO
X9 is not a valid specification. - The order in which variables are named on
DATA LIST
determines their order in the active dataset.
Example
DATA LIST FREE / ID SALARY #V1 TO #V4.
- The
FREE
keyword indicates that the data are in freefield format. Six variables are defined: ID, SALARY, #V1, #V2, #V3, and #V4. #V1 to #V4 are scratch variables that are not stored in the active dataset. Their values can be used in transformations but not in procedure commands.