DROP and KEEP Subcommands (SAVE CODEPAGE command)
DROP and KEEP are used to save a subset of variables. DROP specifies the variables that are not to be saved in the new data file; KEEP specifies the variables that are to be saved in the new data file; variables that are not named on KEEP are dropped.
- Variables can be specified in any order. The order of variables on KEEP determines the order of variables in the data file. The order on DROP does not affect the order of variables in the data file.
- Keyword ALL on KEEP refers to all remaining variables that were not previously specified on KEEP or DROP. ALL must be the last specification on KEEP.
- If a variable is specified twice on the same subcommand, only the first mention is recognized.
- Multiple DROP and KEEP subcommands are allowed. If a variable is specified that is not in the active dataset, or that has been dropped because of a previous DROP or KEEP subcommand, an error results, and the SAVE CODEPAGE command is not executed.
- Keyword TO can be used to specify a group of consecutive variables in the active file.