RENAME Subcommand (IMPORT command)
RENAME renames
variables being read from the portable file. The renamed variables
retain the variable and value labels, missing-value flags, and print
formats contained in the portable file.
- To rename a variable, specify the name of the variable in the portable file, a required equals sign, and the new name.
- A variable list can be specified on both sides of the equals sign. The number of variables on both sides must be the same, and the entire specification must be enclosed in parentheses.
- The keyword
TOcan be used for both variable lists. - Any
DROPorKEEPsubcommand afterRENAMEmust use the new variable names.
Example
IMPORT FILE='/data/newsum.por'
/DROP=DEPT TO DIVISION
/RENAME=(NAME,WAGE=LNAME,SALARY).
-
RENAMErenames NAME and WAGE to LNAME and SALARY. - LNAME and SALARY retain the variable and value labels, missing-value flags, and print formats assigned to NAME and WAGE.