Saving and viewing output

By default, Statistical Package for the Social Sciences (SPSS) displays output on the screen. In order to print or view output at a later time, output must be saved in a file. There are three ways of doing this.

Redirection of output from the SPSS command:

A feature of Unix is the ability to redirect output or input from a command to another command or a file. Output redirection can be used when SPSS is invoked to redirect output from the screen to a specified filename. Output redirection can only be used when the -m option is specified. Example:

spss -m sample.sps > sample.lis Run sample.sps and save output to a file named sample.lis.

SPSS "Set Listing" command:

The SPSS "Set Listing" command directs output from subsequent SPSS commands to a specified file. The advantage of this method is that it can be used with any method of running SPSS.

Within SPSS manager:

When running an SPSS command file within SPSS Manager, the results are displayed in an output window on the top part of the screen. The output can be saved by switching to the output window and saving the window to a file. The output file can be printed using the lpr command. Example:

lpr sample.lis Print sample.lis on the default line printer.