Indiana University
University Information Technology Services
  
What are archived documents?

How do I use SPSS on a Unix system?

At Indiana University, SPSS is available on Libra. You can run SPSS in several ways on most Unix systems on which it is installed.

On this page:


Interactive line mode (prompted session)

To use SPSS interactively in a prompted session, at the system prompt, enter:

spss -m

You may see some informational messages, and then the SPSS> prompt, which is the input line. Enter your SPSS commands (uppercase or lowercase). Terminate each command line with a period ( . ).

To end the session, at the SPSS> prompt, enter:

finish.

Non-interactive mode

To run a job non-interactively, at the system prompt, enter:

spss -m < program.sps > program.lst

Replace program.sps and program.lst with the names of your SPSS command file and the output file to be created, respectively. When the job is executed, the output file will be stored in your current directory.

The Unix I/O redirection operator  <  specifies an input file, and the operator  >  specifies an output file. The Unix I/O redirection operators will work only with the -m switch.

SPSS in background mode

To run an SPSS job as a background process, at the system prompt, add an ampersand ( & ) at the end of the command:

spss -m < program.sps > program.lst &

You will see a process identification number (PID) for the background task, and your terminal will be free for other work while the job runs in the background. You can check the status of your job by entering the Unix command:

ps

When the job has executed, the listing file will be stored either in the default directory or in the directory you specified.

SPSS X Window System session

Note: Because of the experimental nature and unreliability of the X Window System interface in SPSS, UITS does not recommend using SPSS under the X Window System.

SPSS can also run under the X Window System if you have access to an X server (e.g., a Unix workstation or a personal computer with an X server application) and a computer terminal capable of displaying X Window client programs (either a dumb terminal or a personal computer that runs software that makes it act as an X terminal). From your terminal, open an xterm. For the steps necessary to display a remote program on your local computer, see In the X Window System, how do I display a program running on a remote host? (In that document, the computer with SPSS available is the remote host, and your terminal is the local host.) Following those steps, you will have logged into a Unix system that has SPSS available. To begin SPSS, at the system prompt, enter:

spss

This opens the SPSS Manager, which initially consists of the Data Editor window, the Output windows, and a Syntax window. You can enter commands in the Syntax window and execute them by clicking the Run button on the toolbar, or you can execute commands using the menus.

For more information on running SPSS on a Unix system, see the Stat/Math Center's Getting Started with SPSS for Unix.

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 badp in domain all.
Last modified on September 30, 2008.
Please tell us, did you find the answer to your question?