DROP and KEEP Subcommands (SAVE TRANSLATE command)
Use DROP
or KEEP
to include only a subset of variables
in the resulting file. DROP
specifies
a set of variables to exclude. KEEP
specifies a set of variables to retain. Variables that are not specified
on KEEP
are dropped.
- Specify a list of variable, column, or field names separated by commas or spaces.
-
KEEP
does not affect the order of variables in the resulting file. Variables are kept in their original order. - Specifying a variable that is not in the active dataset
or that has been dropped because of a previous
DROP
orKEEP
subcommand results in an error, and theSAVE
command is not executed.
Example
SAVE TRANSLATE OUTFILE='ADDRESS.DBF' /TYPE=DB4 /DROP=PHONENO, ENTRY.
-
SAVE TRANSLATE
creates a dBASE IV file named ADDRESS.DBF, dropping the variables PHONENO and ENTRY.