AUTORECODE

AUTORECODE recodes the values of string and numeric variables to consecutive integers and puts the recoded values into a new variable called a target variable. The value labels or values of the original variable are used as value labels for the target variable.

AUTORECODE VARIABLES=varlist 
 
 /INTO new varlist
 
 [/BLANK={VALID**}
         {MISSING}

 [/GROUP]

 [/APPLY TEMPLATE=’filespec’]

 [/SAVE TEMPLATE=’filespec’]
 
 [/DESCENDING]

 [/PRINT]

**Default if the subcommand omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the AUTORECODE command can be generated from the Automatic Recode dialog.

Release History

Release 13.0

  • BLANK subcommand introduced.
  • GROUP subcommand introduced.
  • APPLY TEMPLATE and SAVE TEMPLATE subcommands introduced.

Example

AUTORECODE VARIABLES=Company /INTO Rcompany.