University of Louisiana at Lafayette
Computing Support Services

SPSS on UCS (Non-graphical)

SELF-HELP GUIDES > STATISTICS > NON-GRAPHICAL SPSS

Contents

Introduction

You can use the windows version of SPSS on UCS or you can use the non-windows version with a telnet session (or Terminal window).

If you use telnet you will also use an editor such as vi to create and edit your SPSS commands file. Alternatively, you can also use an ftp program to copy an SPSS command file from your computer to UCS and to copy the output file from your UCS account to your computer allowing you to copy and paste the SPSS results into a word processor for printing on your own printer.

If you want to use a Terminal window on a workstation, right click and hold the mouse button down to bring up the Workspace Menu and then select Tools. Then left click Terminal to bring up a Terminal window. You can have several windows open at the same time. You can resize the window or reposition the window. If you have more than one window on the desktop, click in the window to make it the active window (one you can type in).

Back to Contents

SPSS Commands File
Information on creating a SPSS syntax file is found in SPSS 6.1 Syntax Reference Guide which is available at the Help Desk, SMH 201, 482-5516.

Your SPSS commands file should conform with the following:
  • Commands start in column 1
  • Continuation lines are indented at least one column
  • Every command ends with a period
  • If data is in a separate file, then include file = 'complete_path_of_unix_file'
  • The commands file has the extension .sps

To run survey.sps, type

    spss -m < survey.sps > survey.lst

The program will print some messages as it processes the commands, then 'End of Job: ...' Examine the listing file. Type less survey.lst Press the space bar to move forward a screen, b to move back a screen, and q to quit the less command. If the program contains errors, use a text editor to fix the errors. Type rm survey.lst to delete the listing file. Then rerun the program.

To print the listing file in the Conference Center lab

lpr -Pconflp survey.lst

To print the listing file in the Stephens lab

lpr -Psmhxlp survey.lst

The ls command lists your files, the quota -v command lists your quota, the rm filename deletes filename.
 
Sample SPSS Commands File
       data list file='/home/abc1234/survey.dat' records=1
          /id 1-3 gender 4 class 5 vote 6.
       variable labels
	  id 'student id' 
	  class 'class grade' 
	  vote 'Who voted for in 2000'. 
       value labels 
          gender 1 'male' 2 'female' / 
          class 1 'freshman' 2 'sophomore' 3 'junior' 
                4 'senior' 5 'grad' / 
          vote 1 'Gore' 2 'Bush' 3 'Other'. 
       missing values id (999) gender to vote (9). 
       frequencies variables = all.

Back to Contents

UNIX Commands

dos2unix file1.sps file1.sps
Converts text file from DOS format to ISO format. Must execute if create file on PC and copy or ftp file to UCS account.

less file1.lst
View contents of file1.lst on screen, space bar to go down one screen, b to go back a screen, q to quit the less command

lpr file1.lst
Print file1.lst on the Conference Center free printer

lpr -Psmhxlp file1.lst
Print file1.lst on the Stephens Hall free printer

mv file1.sps file2.sps Rename file1.sps as file2.sps

quota -v
Check quota

vi file1.sps
Use the vi editor to edit file1.sps

rm file1.lst
Delete file1.lst (must delete the .lst file before re-run spss)

spss -m < file1.sps > file1.lst
Run spss on the SPSS command file file1.sps and produce the listing file file1.lst

Back to Contents

Sample Telnet Session

  1. Connect your computer using STEP-UP modem pool or another ISP.
  2. Telnet to a workstation in the Conference Center (d1.ucs.louisiana.edu to d116.ucs.louisiana.edu).
  3. Using the vi editor, create survey.sps and survey.dat.
  4. spss -m < survey.sps > survey.lst
  5. less survey.lst (use space bar, b, q) and note the errors.
  6. If you have errors, you must delete the listing file (rm survey.lst) before you rerun the program.
  7. vi survey.sps and fix errors.
  8. Rerun the program, note and fix errors until survey.lst is error free.
  9. lpr survey.lst to send the output to Conference Center free printer or alternatively ftp the listing file to your home computer and print it out at home after you exit telnet.
  10. logout
  11. Exit telnet.
  12. Disconnect modem.


Back to Contents

Additional Information
For additional information on any of these topics, contact the Help Desk,
Stephens Hall 201; 482-5516.

Legal Terms

SPSS is a registered trademark of SPSS Inc.



© Copyright 2002 by the University of Louisiana at Lafayette
Computing Support Servicees, P.O. Box 42770, Lafayette LA 70504
Phone: 337/482-5516 · E-Mail: helpdesk@louisiana.edu