Indiana University
University Information Technology Services
  
What are archived documents?

In SPSS for Unix, how do I save a data set?

If you want to use your SPSS data again in the future, you should save your data as a permanent data set. In SPSS for Unix, three types of permanent data set formats can be saved, i.e., .sav, .sys, and .por files.

  • One of two SPSS system files has the .sav extension. Use the SAVE OUTFILE command to save a data set in SPSS system file format. Following is an example: DATA LIST FREE /v1 v2 v3. BEGIN DATA. 1 2 3 4 5 6 7 8 9 END DATA. SAVE OUTFILE = 'data.sav'. FINISH.

    In this example, three variables (v1 to v3) have been saved into a file called data.sav in the default directory.

  • Another SPSS system file has the .sys extension. The above code can be changed to save a .sys file, for example: SAVE OUTFILE = 'data.sys'.

    The .sav and .sys files created in SPSS for UNIX can be read in SPSS for Windows and Macintosh.

  • The other type of SPSS data set file format is the SPSS portable file, which usually has the .por extension. The portable file can be read by SPSS on any platform (e.g., Windows, Unix). To create an export file, use the EXPORT OUTFILE command. For example, in the above example, if you want to create an export file instead of a systems file, replace the line that begins with SAVE with the following: EXPORT OUTFILE = 'data.por'.

    Note: The .por extension is used to denote that this is an SPSS portable file.

For more information about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.

Also see:

This is document afdv in domain all.
Last modified on August 06, 2008.
Please tell us, did you find the answer to your question?