MAKE Subcommand (VARSTOCASES command)
The MAKE
subcommand
names, and optionally labels, the new variable to be created from
the variables on the FROM
list.
- One new variable is required on each
MAKE
subcommand. It must have a unique name. - The label for the new variable is optional and, if specified, must be enclosed in quotes.
- The new variable will have the values of the variables
listed on the
FROM
list. For each case in the original data, one new row will be created for each variable on theFROM
list. - All of the variables on the
FROM
list are required to be of the same type. For example, they must all be numeric or they must all be string. - The dictionary information for the new variable (for
example, value labels and format) is taken from the first variable
in the
FROM
list. If string variables of different lengths are specified, the longest length is used. - Rows are created in the order in which variables
appear on the
FROM
list. - Variables that appear on the
FROM
list will not appear in the new data file. - Variables that are kept in the new data file and
not named on the
FROM
list will have their values propagated for each new row. - When multiple
MAKE
subcommands are used, a variable may not appear on more than oneFROM
list. - A variable may be listed more than once on a
FROM
list. Its values are repeated. - When multiple
MAKE
subcommands are used, theFROM
lists must all contain the same number of variables (variables that are listed more than once must be included in the count).