A common problem is transferring data from one statistical package to another. This FAQ shows how you can convert a SAS version 6 file to an SPSS file (using SPSS version 10). If you have a SAS version 8 file, you can convert that file to a version 6 file or you could use Stat/Transfer to convert your SAS file to SPSS.
Say that you have a SAS data file called auto.sd2 that is located on your computer in a folder called c:dissertation . You can use the following SPSS program to read that file and save it as an SPSS data file called auto.sav in the same directory.
get sas data="c:dissertationauto.sd2". save outfile="c:dissertationauto.sav".
After converting the file, it is prudent to verify that the conversion was successful. You can do this by examining the SAS file using proc contents, proc means and proc print
and then examining the SPSS file using display dictionary, descriptives and list cases.
You might have a format file associated with auto.sd2 that contains labels for your variables (in SPSS terminology, value labels). Say your formats are stored in the same directory (i.e., c:dissertation), then you need to use SAS to convert your format file into a format that SPSS can understand using a program like the one below.
LIBNAME library "c:dissertation"; PROC FORMAT LIBRARY=library CNTLOUT=library.auto_fmt; RUN;
This example creates a file call c:dissertationauto_fmt.sd2 that contains the formats for your data file. You can then ask SPSS to try and include those formats in your SPSS file using the program shown below.
get sas data="c:dissertationauto.sd2" /formats="c:dissertationauto_fmt.sd2". save outfile="c:dissertationauto.sav".
We say that SPSS will "try" to include the formats because not all SAS formats are compatible with SPSS formats. For example, SPSS does not allow formats for character variables (so any SAS formats for character variables will be ignored). For more information about the kinds of formats that cannot be converted, see the SPSS online documentation about the get sas command.