Overview (GET command)
GET
reads IBM® SPSS® Statistics data files. It also reads SPSS/PC+
data files, but you should not read SPSS/PC+ data files in Unicode
mode (see Operations below).
GET
is used only
for reading IBM SPSS Statistics data files.
See DATA LIST
for information
on reading and defining data in a text data file. See MATRIX DATA
for information on defining
matrix materials in a text data file. For information on defining
complex data files that cannot be defined with DATA LIST
alone, see FILE TYPE
and REPEATING DATA
.
The program can also read data files created for other
software applications. See IMPORT
for information on reading portable files created with EXPORT
. See the
relevant commands, such as GET DATA
, GET STATA
, and GET SAS
, for information on reading files
created by other software programs.
Options
Variable Subsets and Order. You can
read a subset of variables and reorder the variables that are copied
into the active dataset using the DROP
and KEEP
subcommands.
Variable Names. You can rename variables as they are copied into the active dataset with the
RENAME
subcommand. Long variable names are supported when explicitly specified on
the /VARIABLES
subcommand. Variable names are truncated to 8 bytes when they are
referenced through a vector in the /NAMES
subcommand.
Variable Map. To confirm the names and order of variables in the active dataset,
use the MAP
subcommand.
Basic Specification
- The basic specification
is the
FILE
subcommand, which specifies the IBM SPSS Statistics data file to be read.
Subcommand Order
-
FILE
must be specified first. - The remaining subcommands can be specified in any order.
Syntax Rules
-
FILE
is required and can be specified only once. -
KEEP
,DROP
,RENAME
, andMAP
can be used as many times as needed. -
GET
cannot be used inside aDO IF—END IF
orLOOP—END LOOP
structure.
Operations
- If
KEEP
is not specified, variables in the active dataset are in the same order as the original data file. - A file saved with weighting in effect maintains
weighting the next time the file is accessed. For a discussion of
turning off weights, see
WEIGHT
. - In Unicode mode, for code page data files and data files created in releases prior to 16.0, the defined width of string variables in tripled. You can use ALTER TYPE to automatically adjust the width of all string variables.See SET command, UNICODE subcommand for more information.
- In Unicode mode, SPSS/PC+ data files may not be read correctly.
- SPSS/PC+ data files can be read only on Windows operating systems.