Running SPSS Jobs on Linux

Overview and Documentation

SPSS for Linux does not include a graphical user interface like the Windows version, but has most of the same capabilities. Instead, SPSS runs syntax with a command from the linux prompt, which SPSS refers to as "batch facility" processing.

Batch Facility User's Guide

Full documentation of SPSS 19 for Linux is available on our web server. If you are in the SSCC's domain (e.g. in the Social Science building) you will be able to access it. If you need to access it remotely, you should use VPN to connect to SSCC.

Running SPSS Jobs

The basic linux syntax for running an SPSS job is:

> spssb -f filename.sps -out filename.log

where filename is the name of your SPSS syntax file. The file extensions (.sps, .log) don't matter, but it is a good idea to be consistent.

Some SPSS Details

Output Format

By default, spssb gives you output in text ("draft") format. Not only is this ugly to work with, but you will not be able to produce graphs. Html output (web output) is easier to work with, and you can produce it by using the -type option

> spssb -f filename.sps -type html -out filename.html

Data Format

You can use the same *.sav data files in both linux and Windows.

Linux Details

The usual job management tools work just fine with SPSS jobs, such as putting them in the background, terminating them, etc.

To run SPSS batch facility jobs in linux batch mode, use

> spssb -f filename.sps -type html -out filename.html &

See Managing Jobs on Linstat for more information.

An Example

Given a short syntax file, carlinux.sps process it with the SPSS batch facility with the linux command

> spssb -f carlinux.sps -out carlinux.log &

and you get the default text output, carlinux.log.

For nicer output, change -type to html

> spssb -f carlinux.sps -type html -out carlinux.log &

and you get output, carlinux.html, suitable for the web or use in Word.

Last Revised: 7/29/2016