User Guide

53
Data Files
Saving Data F
iles in SAS Format
Special han
dling is given to various aspects of your data when saved as a SAS file.
These cases include:
Certain characters that are allowed in SPSS variable names are not valid in SAS,
such as @, #,
and $. These illegal characters are replaced with an underscore
when the data are exported.
SPSS variable labels containing more than 40 characters are truncated when
exported to a SAS v6 file.
Where they exist, SPSS variable labels are mapped to the SAS variable labels.
If no varia
ble label exists in the SPSS data, the variable name is mapped to
the SAS variable label.
SAS allows only one value for system-missing, whereas SPSS allows numerous
system-missing values. As a result, all system-missing values in SPSS are
mapped to a
single system-missing value in the SAS file.
Save Value Labels
You have the option of saving the values and value labels associated with your data
file to a S
AS syntax file. For example, when the value labels for the cars.sav data file
are exported, the generated syntax file contains:
libname library 'd:\spss\' ;
proc format library = library ;
value ORIGIN /* Country of Origin */
1 = 'America
n'
2 = 'European'
3 = 'Japanese' ;
value CYLIND
ER /* Number of Cylinders */
3 = '3 Cylinders'
4 = '4 Cylinders'
5 = '5 Cylinders
'
6 = '6 Cylinders'