16.4.9 The GET Command

GET variable[(index[,index])]
    [/FILE={file | *}]
    [/VARIABLES=variable…]
    [/NAMES=variable]
    [/MISSING={ACCEPT | OMIT | number}]
    [/SYSMIS={OMIT | number}].

The READ command reads numeric data from an SPSS system file, SPSS/PC+ system file, or SPSS portable file into a matrix variable or submatrix:

Specify the name or handle of the file to be read on FILE. Use ‘*’, or simply omit the FILE subcommand, to read from the active file. Reading from the active file is only permitted if it was already defined outside MATRIX.

List the variables to be read as columns in the matrix on the VARIABLES subcommand. The list can use TO for collections of variables or ALL for all variables. If VARIABLES is omitted, all variables are read. Only numeric variables may be read.

If a variable is named on NAMES, then the names of the variables read as data columns are stored in a string vector within the given name, replacing any existing matrix variable with that name. Variable names are truncated to 8 bytes.

The MISSING and SYSMIS subcommands control the treatment of missing values in the input file. By default, any user- or system-missing data in the variables being read from the input causes an error that prevents GET from executing. To accept missing values, specify one of the following settings on MISSING:

ACCEPT

Accept user-missing values with no change.

By default, system-missing values still yield an error. Use the SYSMIS subcommand to change this treatment:

OMIT

Skip any case that contains a system-missing value.

number

Recode the system-missing value to number.

OMIT

Skip any case that contains any user- or system-missing value.

number

Recode all user- and system-missing values to number.

The SYSMIS subcommand has an effect only with MISSING=ACCEPT.