Converting SPSS system files to portable files

This document describes the steps necessary to move SPSS system files from one operating system to another. It details the conversion and transfer procedures, then answers some questions you may have.

The Conversion and Transfer Procedure

The procedure can be summarized in three steps. First, convert the system file on the first system to portable file format. Second, transfer the portable file to the second system using ftp. Finally, convert the portable file back to a system file on the second system. These steps are described in detail below.

  1. Using the following SPSS program, export.sps, as an example, convert the SPSS system file to a portable file:
       get file='survey.sav'
       export outfile='survey.por'
       finish
    
    Multiple system files may be converted in the same program like this:
       get file='survey1.sav'
       export outfile='survey1.por'
       get file='survey2.sav'
       export outfile='survey2.por'
       get file='survey3.sav'
       export outfile='survey3.por'
       finish
    
    Run the export.sps program to create the portable file(s):
       spss -m export.sps > export.lst
    
  2. Transfer the portable file to the AIX system using ftp. Make sure the transfer is done in ASCII mode, not binary. for confirmation to transfer each file with a .por extension.

  3. Convert the portable file back to an SPSS system file on the other system, using the following program, import.sps, as an example.
       import file='survey.por'
       save outfile='survey.sav'
       finish
    
    If using SPSS for Windows, you can simply choose the "SPSS Portable File" type from the file type pull-down menu when you go to open a file from the "File" menu. Multiple portable files can be converted back to system files in the same program.
       import file='survey1.por'
       save outfile='survey1.sav'
       import file='survey2.por'
       save outfile='survey2.sav'
       import file='survey3.por'
       save outfile='survey3.sav'
       finish
    
    Run the import.sps program to recreate the system file(s) on the other system (if necessary):

Q & A

Now here are some questions (with answers!) you may have about SPSS system files and this conversion process.

Q: What are SPSS system files and how can I tell if I have any?

A: System files are special binary files created by SPSS when you use the SAVE or XSAVE command in SPSS. These files contain all the original data, plus any new computed or recoded variables, value labels, variable labels, formats, etc. Most zoo users have followed the convention of using either .sav, .sys, or .fil as the file extension when naming SPSS system files. If you have any files which are xxx.sav, yyy.sys, or zzz.fil, then these may be SPSS system files.

Q: I have a file called survey.sav. How can I be certain that this is an SPSS system file?

A: Run the following SPSS program. If the program runs without errors, the file is an SPSS system file. get file='survey.sav' display variables finish

Q: This conversion process sounds complicated. Is there an alternate procedure?

A: Yes. If you still have ASCII files containing the original raw data and SPSS program files which created the system file, you could simply transfer the data and program files. Once transferred, you would just rerun the SPSS program, which would read the data from the ASCII file and recreate the system file. There is a drawback to this, however. You may have run other SPSS programs which computed new variables, recoded variables, or modified or added to the data in some way. Assuming you saved the modified data in the same system file, you would need to find all these extra SPSS programs, transfer them to the new system, and rerun them after they were transferred.

Q: I know how to do a binary file transfer with ftp. Why can't I just transfer my system files from one computer to another?

A: While you can successfully do a binary transfer of the system file, the operating system on the receiving end will not be able to interpret the information in the file. Binary files are specific to an operating system (like MS-DOS, VMS, or Unix). An SPSS system file created on zoo can be used only on zoo (or on another AIX system). Likewise, an SPSS system file created in Windows can be used only in Windows (on your PC or on someone else's system).


Last updated: 22 May 1997.
For more information, contact Alan.Howard@uvm.edu