BY Subcommand (UPDATE command)
BY
specifies
one or more identification, or key, variables that are used to match
cases between files.
-
BY
must follow theFILE
subcommands and any associatedRENAME
andIN
subcommands. -
BY
specifies the names of one or more key variables. The key variables must exist in all input files and have the same names in all of the files. The key variables can be string variables (long strings are allowed). - All input files must be sorted in ascending order
of the key variables. If necessary, use
SORT CASES
beforeUPDATE
. - Missing values for key variables are handled like any other values.
- The key variables in the primary file must identify unique cases. If duplicate cases are found,
the program issues an error and
UPDATE
is not executed. The system-missing value is treated as one single value.