RENAME subcommand (CASESTOVARS command)

CASESTOVARS creates variable groups with new variables. The first part of the new variable name is either derived from the name of the original variable or is the rootname specified on the RENAME subcommand.

  • The specification is the original variable name followed by a rootname.
  • The named variable cannot be a SPLIT FILE variable and cannot appear on the ID, FIXED, INDEX, or DROP subcommands.
  • A variable can be renamed only once.
  • Only one RENAME subcommand can be used, but it can contain multiple specifications.
  • If there is a single index variable and it is a string, RENAME is ignored. The string values are used as the new variable names. For string values that do not form valid variable names, names of the general form Vn are used, where n is a sequential integer.