Variable Format Specifications for TYPE = TXT (GET DATA command)
For both fixed and delimited files, available formats include (but are not limited to):
AUTO. Automatic. The format is automatically determined based on an evaluation of all
the data values. The DATATYPEMIN
subcommand specifies the percentage of values that
must conform to the same data type. If no consistent format is used by the specified percentage of
values, the variable is assigned the string data type.
Fn.d. Numeric. Specification of the total number of characters (n) and decimals (d) is optional.
An. String (alphanumeric). Specification of the maximum string length (n) is optional.
DATEn. n Dates of the general format dd-mmm-yyyy. Specification of the maximum length (n) is optional but must be eight or greater if specified.
ADATEn. Dates of the general format mm/dd/yyyy. Specification of the maximum length (n) is optional but must be eight or greater if specified.
DOLLARn.d. Currency with or without a leading dollar sign ($). Input values can include a leading dollar sign, but it is not required. Specification of the total number of characters (n) and decimals (d) is optional.
X. Skip this variable. The specified variable and any values for that variable are not included. Although the variable is not included, a valid variable name is required.
For a complete list of variable formats, see Variable Types and Formats.
Example
GET DATA /TYPE = TXT
/FILE = '/data/textdata.dat'
/DELCASE = LINE
/DELIMITERS = "\t ,"
/ARRANGEMENT = DELIMITED
/FIRSTCASE = 2
/VARIABLES =
id F3.0
gender A1
bdate DATE10
salary DOLLAR8
jobtime F4.2
prevexp X
minority F3.0.
Note: For default numeric
(F) format and scientific notation (E) format, the decimal indicator
of the input data must match the IBM® SPSS® Statistics locale decimal indicator (period or comma). Use SHOW DECIMAL
to display the current decimal
indicator and SET DECIMAL
to
set the decimal indicator. (Comma and Dollar formats recognize only
the period as the decimal indicator, and Dot format recognizes only
the comma as the decimal indicator.)