TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
For TYPE=CSV
, the TEXTOPTIONS
subcommand
controls the delimiter and qualifier. For TYPE=CSV
and TYPE=TAB
,
it controls the decimal indicator and the data value formatting. For
all other types, this subcommand is ignored.
DELIMITER="char". Specifies the delimiter (separator)
between values. The value must be a single character (single byte),
enclosed in quotes (single or double quotes). The default is either
a comma or semicolon, based on the decimal indicator. If the decimal
indicator is a period, then the default separator is a comma. If the
decimal indicator is a comma, then the default separator is a semicolon.
The value cannot be the same as the QUALIFIER
or DECIMAL
value.
This setting only applies for TYPE=CSV
. For other
types, it is ignored.
QUALIFIER="char". Specifies the qualifier to use to
enclose values that contain the delimiter character. The default
is a double quote. The value must be a single character (single byte),
enclosed in quotes (single or double quotes). Values that contain
the qualifier character will also be enclosed by the qualifier and
qualifiers within the value will be doubled. The value cannot be the
same as the DELIMITER
or DECIMAL
value.
This setting only applies for TYPE=CSV
. For other
types, it is ignored.
DECIMAL=DOT|COMMA. Specifies the value to use as the
decimal indicator for numeric values. The default is the current IBM® SPSS® Statistics decimal
indicator. This setting has no effect on the decimal indicator used
with FORMAT=VARIABLE
for comma, dollar, custom currency,
and dot formats. (Comma and dollar always use the period as the decimal
indicator; dot always uses the comma as the decimal indicator, custom
currency formats honor the decimal indicator defined in the format)
The value cannot be the same as the DELIMITER
or QUALIFER
value.
(If DECIMAL=DOT
, the default delimiter is a comma;
if DECIMAL=COMMA
, the default delimiter is a semicolon.)
- DOT. Use a period (.) as the decimal indicator.
- COMMA. Use a comma (,) as the decimal indicator.
The default decimal indicator is the current IBM SPSS Statistics decimal
indicator. The current IBM SPSS Statistics decimal
indicator can be set with SET LOCALE
(which uses
the OS locale decimal indicator) or SET DECIMAL
and
can be shown with SHOW DECIMAL
. The TEXTOPTIONS
DECIMAL
setting overrides the default decimal indicator in
the current SAVE TRANSLATE
command but does not change
the default/current IBM SPSS Statistics decimal
indicator, and it has no effect on the determination of the default
delimiter for TYPE=CSV
.
FORMAT=PLAIN|VARIABLE. Specifies the data formats to use when writing out data values.
- PLAIN. Remove all "extraneous" formatting from numeric values. This is the default. For example, a dollar format value of $12,345.67 is written simply as 12345.67 (or 12345,67, depending on the decimal indicator). The number of decimal positions for each value is the number of decimal positions necessary to preserve the entire value (and different values of the same variable may have a different number of decimal positions). Dates are written in the general format mm/dd/yyyy. Times are written in the general format hh:mm:ss.
- VARIABLE. Use the print format for each variable to
write data values. For example, a value of 12345.67 with a print
format of
DOLLAR10.2
is written as $12,345.67 (and is qualified with double quotes or the user-specified qualifier if a comma is the value delimiter).
Print formats can be set with the PRINT FORMATS
or FORMATS
commands
and displayed with DISPLAY DICTIONARY
.