FIELDNAMES Subcommand (GET TRANSLATE command)

FIELDNAMES translates spreadsheet field names into variable names.

  • FIELDNAMES can be used with spreadsheet and tab-delimited ASCII files only. FIELDNAMES is ignored when used with database files.
  • Each cell in the first row of the spreadsheet file (or the specified range) must contain a field name. If a column does not contain a name, the column is dropped.
  • Field names are converted to valid IBM® SPSS® Statistics variable names.
  • If two or more columns in the spreadsheet have the same field name, digits are appended to all field names after the first, making them unique.
  • Illegal characters in field names are changed to underscores in this program.
  • If the spreadsheet file uses reserved words (ALL, AND, BY, EQ, GE, GT, LE, LT, NE, NOT, OR, TO, or WITH) as field names, GET TRANSLATE appends a dollar sign ($) to the variable name. For example, columns named GE, GT, EQ, and BY will be renamed GE$, GT$, EQ$, and BY$ in the active dataset.

Example

GET TRANSLATE FILE='MONTHLY.SYM' /FIELDNAMES.
  • GET TRANSLATE creates a active dataset from a Symphony 1.0 spreadsheet. The first row in the spreadsheet contains field names that are used as variable names in the active dataset.