Path: > Overview of SPSS > Interface
Statistical Package for the Social Sciences

Syntax for INTERFACE Commands


Interface commands control the creation of SPSS system files. A system file contains all data and descriptive information that defines the data (e.g., variable labels, value labels, print formats, missing values, etc.). The system file includes not only those variables from the raw data file but also any variables that subsequently were created using the COMPUTE or IF commands. The advantage of an SPSS system file is faster processing time (SPSS doesn't have to recreate the system file) and less cumbersome control files for subsequent SPSS runs. Any changes to an SPSS system file can be saved in an updated SPSS system file.

An SPSS system file is created on command by the SPSS program itself, which generates a binary file designed for specific types of computers using designated operating systems. This file can be read by any SPSS program operating on a compatible computer and operating system. A system file cannot be read by normal human beings--only by the computer and operating system for which it was created. That is, a system file created for a unix computer cannot be read on either a Windows or a Macintosh computer.

However, there are ways to export a system file for import on a different type of computer. SPSS commands permit the renaming, dropping, and reordering of variables in newly created file. These task are also accomplished through interface commands. Some of the more important ones are given below.


GET FILE = [name].sav.
This command directs the computer to retrieve a saved system file of the form
[name of the file].sav

where sav is the extension used for all system files.


SAVE OUTFILE = [name].sav.
The SAVE command instructs SPSS to save the file currently in memory as an SPSS system. The OUTFILE=output subcommand tells SPSS to name the system file [name].sav.

The saved file the data and all data definitions and documention in the file in the computer memory. This includes any changes you may have made to the file after retrieving it with GET FILE or after creating the file from raw data using DATA LIST.

Saving an SPSS system file provides the opportunity to delete variables from your file and/or reorganize the sequence in which the variables are saved. Use the KEEP subcommand to specify the variables you want to save (and their order) to specify the variables you want to delete. The command


saves the listed variables in the sequence in which they are listed in the new system file. Be careful when using the KEEP subcommand, for any variable not identified on the list will be deleted from the file.

You also can change variable names on the SAVE command with the RENAME subcommand. Its syntax is:

SAVE OUTFILE=bush.sav/RENAME= (old varname=new varname)

For example

(v1=CITYID) (v2=POP86)(v3=TYPE)



EXPORT OUTFILE = [name].por.
EXPORT OUTFILE works just like the SAVE OUTFILE command, including the KEEP and RENAME subcommands. The difference is that EXPORT saves a [name].por file, which is an encoded ASCII file that can be read by another SPSS program on any computer.


IMPORT FILE = [name].por.
This command functions much like GET FILE, except that it only accepts [name].por files saved by the EXPORT command. It then reconverts [name] to an SPSS file in memory.

After successfully importing a program into SPSS, almost all users will want to save the SPSS file in memory as a system file. This can be done with the SAVE OUTFILE command.

Once you have saved the [name].por] file on the unix computer, you must download the file to your microcomputer. This requires using a File Transfer Protocol (FTP) program. NU's internet software disk, "Little Domain on the Prairie," should have loaded an FTP program on your computer.

If you have you have a Macintosh, look for the program FETCH. If you have a Windows computer, look for a Ws_FTP program in the "download" folder. Then use SPSS for Windows to IMPORT FILE = [name.por]. Run DISPLAY LABELS to see whether the process worked.