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
.savextension. Use theSAVE OUTFILEcommand 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 (
v1tov3) have been saved into a file calleddata.savin the default directory. - Another SPSS system file has the
.sysextension. The above code can be changed to save a.sysfile, for example: SAVE OUTFILE = 'data.sys'.The
.savand.sysfiles 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
.porextension. The portable file can be read by SPSS on any platform (e.g., Windows, Unix). To create an export file, use theEXPORT OUTFILEcommand. For example, in the above example, if you want to create an export file instead of a systems file, replace the line that begins withSAVEwith the following: EXPORT OUTFILE = 'data.por'.Note: The
.porextension 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:
Last modified on August 06, 2008.






