| VARIABLE NAMES |
Only the short variable name style is supported.
SPSS variable names can be up to eight characters in length. All alphabetic
characters must be uppercase. The first character in a variable name can be
an uppercase letter (A-Z), a dollar sign ($), or an "at" sign (@). Subsequent
characters can be any of these characters, plus numerals (0-9), periods (.),
number signs (#), or underscores ( _ ).
SPSS reserves 13 words, which are not allowed to stand alone as variable
names: ALL, AND, BY, EQ, GE, GT, LE, LT, NE, NOT, OR, TO, and WITH. If the
program encounters any of these as a variable name, it appends an underscore
to the variable name to distinguish it from the reserved word. For example, ALL
becomes ALL_
.
Invalid characters are converted to underscores unless they are encountered
as the first character in a variable name. In that event, the "at" sign (@)
is used instead. For example, %ALL
becomes @ALL
.
When you are exporting to SPSS, SAS variable names that are longer than
eight characters are truncated to eight characters. If the new name is truncated
and results in an existing name, the last character changes to a single digit
(1,2, 3...) until the variable name becomes unique. |
| VALUE LABELS |
SPSS stores value labels within the data file. The
values are turned into format library entries as they are read with the IMPORT
procedure. The name of the format includes its associated variable name, modified
to meet the requirements of format names. The name of the format is also associated
with a variable in the data set. You can use the FMTLIB=libref.format-catalog;
statement to save the formats catalog in a specified SAS library.
The EXPORT procedure saves the value labels that are associated with
the variables when writing to an SPSS file. The procedure uses the formats
that are associated with the variables to retrieve the value entries. You
can use the FMTLIB=libref.format-catalog statement to tell SAS the location
of the format catalog. |
| DATA TYPES |
SPSS supports numeric and character field types that
map directly to SAS numeric and character fields. This list shows other SPSS
data types and how the IMPORT procedure converts them to SAS formats.
|
Date, Jdate, Wkday, Qyr, Wkyr: Date, Jdate, Wkday, Qyr, Wkyr |
|
Datetime, Dtime: Converts to a SAS datetime value and SAS datetime
format. |
|
Time: Converts to a SAS datetime value and SAS datetime format. |
|
Adate: Converts to a SAS date value in the mmddyy
format. |
|
Moyr: Converts to a SAS date value in the mmmyy format. |
When writing SAS data to an SPSS file, the EXPORT procedure converts
data into SPSS variable types.
When exporting data, character fields have a maximum length of 256.
Numeric fields are 8-byte floating-point numbers, with these format
conversions:
| COMMA |
Converts to SPSS format type comma. |
| DOLLAR |
Converts to SPSS format type dollar. |
| DATE |
Converts to SPSS format type date. |
| MMDDYY |
Converts to SPSS format Adate. |
| MMMYY |
Converts to SPSS format Moyr. |
| DATETIME |
Converts to SPSS format Dtime. |
| TIME |
Converts to SPSS format Time. |
|