Frequently Asked Questions
About Statistical Software

FAQ ?

I have heard that UVM has a site license for SAS and SPSS. How do I get one (or both) of these software packages for my desktop (or laptop) computer?
How do I run SAS or SPSS on zoo?
My SAS (or SPSS) program says it cannot find my data file. I know it is there in my directory, so why can't the program find it?
A colleague gave me an SPSS program that she created and ran on zoo. How can I run this in SPSS for Windows?
A colleague gave me an SPSS program that he created and ran on zoo. When I try to run this in SPSS for Windows, I get lots of errors. What's going on?
How do I print the SAS or SPSS output file from zoo on the printer that is attached to my PC (or Macintosh)?
A colleague has an SPSS system file (or SAS data set) that she created on zoo. How can I transfer and use this in SPSS for Windows (or SAS for Windows)?
My data has been saved in an SPSS system file. Can SAS read this SPSS system file?
My data has been saved in a SAS data set. Can SPSS read this SAS data set?
My data has been entered in an Excel (or Lotus) spreadsheet. How can I read this data into SAS on zoo?
I want to create a new variable in SAS (or SPSS) that is the sum of several other variables. But when I do this, most of my cases for the summed variable have missing values. What's going on?
I'm trying to read a data file into SPSS on zoo. The file contains very long lines of data, but it seems that SPSS will not read data past column number 1024. How do I get SPSS to read all the data on the record?
I'm trying to get some plots from the SPSS REGRESSION procedure on zoo. However, none of the requested plots appear in the printed output. How do I get SPSS to do the plots I want?

Return to Statistics Page


I have heard that UVM has a site license for SAS and SPSS. How do I get one (or both) of these software packages for my desktop (or laptop) computer?

CIT licenses the SAS System for Windows and Macintosh from SAS Institute, Inc. and SPSS for Windows and Macintosh from SPSS, Inc. These licenses are renewed annually and cost CIT approximately $10,000 for a 500 user SPSS license and a 200 user SAS System license. UVM affiliates may partake of these site license arrangements for a modest one-time cost of $400 for SAS or $200 for SPSS. Keep in mind that these are one-time costs and that all future upgrades will be provided at no extra cost. These costs do not include manuals which can be ordered from the respective companies through the University Store, or can be ordered directly from the web pages of the respective companies.

To obtain either or both of these software packages for your computer, send mail to Alan Howard or call him at 656-2009. Arrangements will be made to install the software on your computer after CIT's Business Office has received a UVM budget number or payment has been made by some other means.

The SAS System is shipped on CD-ROMs, thus your system must have a CD-ROM drive in order for SAS to be installed. Our site license for the SAS System also allows us to distribute SAS software to students at no cost to the student. Unfortunately, the site license agreement with SPSS, Inc. specifically prohibits CIT from distributing SPSS software to students.

For more details, see the document Statistical Software Site Licensed by CIT.

Return to top



How do I run SAS or SPSS on zoo?

There are several ways to run SAS and SPSS (and BMDP) on the zoo cluster, depending on whether you are connecting to zoo via terminal emulation or with an X-windows session. See the document Running SAS, SPSS, and BMDP on the Academic Zoo Cluster for details.

Return to top



My SAS (or SPSS) program says it cannot find my data file. I know it is there in my directory, so why can't the program find it?

The most likely cause of this error is that you have not typed the name of the data file exactly as it appears in a directory listing. Remember that the Unix file system is case-sensitive; file.dat is not the same as FILE.DAT and is not the same as File.Dat, etc. If you see that your file is named file.dat when you get a directory listing with the "ls" command, then you should not put FILE.DAT in the SAS INFILE statement or in the SPSS DATA LIST statement.

Return to top



A colleague gave me an SPSS program that she created and ran on zoo. How can I run this in SPSS for Windows?

SPSS for Windows has the capability of running SPSS command (syntax) files. This involves opening the syntax file into a "syntax window", choosing the commands you wish to run, and clicking the "Run" button. Output from these commands will appear in the Output window.

In versions of SPSS below 7.0, go to the "File" menu, choose "Open", choose "SPSS Syntax", then open the SPSS command file given to you. This opens a syntax window containing the command file.

To run the commands in the syntax file, highlight (using the mouse or shift-arrow key combination) the commands you wish SPSS to run, then click on the "Run" button on the toolbar. The "Run" button has a small black triangle pointing to the right on it.

Location of Run button

In version 7.0 and above, go to the "File" menu, choose "Open", click on the file type drop-down selection button, and select "Syntax(*.sps)", then open the SPSS command file given to you. You can follow the steps above to run the command file, or you can choose from the "Run" menu in the syntax window's menu bar.

Potential problems with this method of running SPSS are addressed in the next FAQ.

Return to top



A colleague gave me an SPSS program that he created and ran on zoo. When I try to run this in SPSS for Windows, I get lots of errors. What's going on?

This problem results from the way SPSS determines how an SPSS command begins or ends. When running SPSS non-interactively on zoo, the commands in an SPSS syntax file must start in the first column. If a command requires multiple lines in the syntax file, the command must be indented one or more spaces on subsequent lines. When running SPSS syntax in Windows, commands must end with a period. Indenting multiple-line commands is not necessary. So, SPSS on zoo expects a command to begin in the first column, while SPSS in Windows expects a command to end with a period. To make a syntax file that worked on zoo also work in Windows, just add periods to the end of all SPSS commands.

Return to top



How do I print the SAS or SPSS output file from zoo on the printer that is attached to my PC (or Macintosh)?

There are several ways to accomplish this. One way is to download the output file to your PC or Macintosh using an ftp client program (such as FTP Voyager in Windows or Fetch on a Macintosh). Then open the output file using an application such as Notepad or Simple Text and print it. Be sure to use a non-proportional font such as Courier or Monaco so that data in columns of the output will line up correctly.

Another way to print a file from zoo to your printer is to use the ansiprint command on zoo. At your zoo prompt, type ansiprint output.lst (substituting the name of your output file for output.lst) and the file will be transferred and printed on your locally attached printer. This command will not work in all circumstances. Your printer must be attached to the PC's parallel (LPT:) port or the Macintosh's printer port. You must be connecting to zoo using a terminal emulation program that does true VT-100 terminal emulation. Kermit, the terminal program of QVT/Net, and NCSA Telnet for Macintosh are examples of terminal emulation programs that allow the ansiprint command to function properly. Ansiprint may or may not work with other terminal emulation programs (your mileage may vary).

Return to top



A colleague has an SPSS system file (or SAS data set) that she created on zoo. How can I transfer and use this in SPSS for Windows (or SAS for Windows)?

An SPSS system file created on zoo can be opened in SPSS for Windows without modification. Transfer the system file to your PC using a binary ftp file transfer and open it in the SPSS for Windows data editor window. However, the opposite may or may not be true, depending on the version of SPSS you are using in Windows. To transfer SPSS system files successfully every time, use the method described in the next paragraph.

Another method of transferring SPSS system files involves exporting the data to a file with a format which can be transferred to and read by SPSS (or SAS) running on any operating system, not just Windows. SPSS calls this file format a portable file; SAS calls it a transport file. The steps are similar for each package. First, create an SPSS portable file from the system file (or create a SAS transport file from the SAS data set.) Then, this portable or transport file must be transferred from zoo via ftp. Then, the SPSS system file can be imported from the portable file (or the SAS data set can be imported from the transport file). For more information and details on how to do the conversion and transfer process, see the following documents:

Converting SPSS system files to portable files and
Converting SAS data sets to transport files
Return to top



My data has been saved in an SPSS system file. Can SAS read this SPSS system file?

SAS cannot read SPSS system files, but it can read SPSS portable files. You will need to save your SPSS data file in portable format. To do this, use the EXPORT command:

        export outfile='gooddata.por'.
You can then read this SPSS portable file in SAS by using the "SPSS engine" in a LIBNAME statement, and save the data as a SAS data set in a DATA step:
        libname spssdata SPSS 'gooddata.por';
        libname sasdata '.';
        data sasdata.gooddata;
             set spssdata._first_;
        run;
The above statements will allow SAS to read the SPSS portable file and save the data as a permanent SAS data set. SPSS missing values (system and user-defined) are converted to SAS missing values. SPSS variable labels are converted to SAS labels. SPSS value labels, however, are not converted to SAS formats by this "SPSS engine". A perl script was written by Frank Stetzer of the University of Wisconsin, Madison, to extract SPSS value labels from the portable file and create a PROC FORMAT for use in SAS. Contact Alan Howard if would like information on how to use this perl script.

Return to top



My data has been saved in a SAS data set. Can SPSS read this SAS data set?

SPSS cannot read SAS data sets, but it can read SAS transport files. You will need to save your SAS data set as a transport file. There is more than one way to create a transport file in SAS, but SPSS can only read a transport file created by the following method. For example, you have a SAS data set called survey which is stored in your sasdata directory. The following SAS commands will create a SAS transport file:

        libname in 'sasdata';
        libname out xport 'tranfile.xpt';
        proc copy in=in out=out memtype=data;
        select survey;
        run;
You can then read this SAS transport file in SPSS by using the following SPSS commands:
        get sas data='tranfile.xpt'.
        save outfile='survey.sav'.
        execute.
These statements will allow SPSS to read the SAS transport file and save it as an SPSS system file called survey.sav.

Note that a SAS transport file can contain more than one SAS data set. If this is the case, then you must tell SPSS which one to "extract" from the transport file. For example, the SAS transport file may contain two data sets, survey1 and survey2. The following SPSS commands will extract both data sets from the transport file:

        get sas data='tranfile.xpt' dset=survey1.
        save outfile='survey1.sav'.
        execute.
        get sas data='tranfile.xpt' dset=survey2.
        save outfile='survey2.sav'.
        execute.
Return to top



My data has been entered in an Excel (or Lotus) spreadsheet. How can I read this data into SAS on zoo?

The easiest way to do this is to save your data as a comma-delimited text file. This is very easy to do in Lotus or Excel. Just go to the "File" menu, choose "Save As", and select "Comma-delimited (*.csv)" from the available file types. Transfer this file to zoo, making sure that you do an ASCII transfer, not a binary transfer. In your SAS program, use the dsd option on your INFILE statement to let SAS know that commas in the data file are delimiting adjacent values:

   INFILE 'datafile.csv' dsd;
The dsd option correctly interprets two consecutive commas to mean that there is a missing value for the variable between the successive commas.

Return to top



I want to create a new variable in SAS (or SPSS) that is the sum of several other variables. But when I do this, most of my cases for the summed variable have missing values. What's going on?

This problem is caused by missing values for one or more variables and is called "propagation of missing values". When you create a new variable by summing several existing variables in an arithmetic expression (e.g. total=a+b+c+d+e), should any one of the variables in the summation have a missing value, the total will also be missing. The solution to this problem is to use the SUM function rather than an arithmetic summation. The SUM function will always return a total of the non-missing values, unless the values of all variables being summed are missing. To translate the above arithmetic expression into SAS and SPSS commands:

   SAS:   total = sum(a,b,c,d,e);
   SPSS:  compute total = sum(a,b,c,d,e).
Return to top



I'm trying to read a data file into SPSS on zoo. The file contains very long lines of data, but it seems that SPSS will not read data past column number 1024. How do I get SPSS to read all the data on the record?

By default, SPSS will not read records longer than 1024 bytes. In order to tell SPSS that your data file has records longer than 1024, you must use the file handle statement with the lrecl option.

For example, your data file is called census.dat and has records that are 4800 bytes in length. Your SPSS command file should include a file handle statement like this:

   file handle census / name='census.dat' lrecl=4800.
   data list file=census / var1 1-3 ...
Return to top



I'm trying to get some plots from the SPSS REGRESSION procedure on zoo. However, none of the requested plots appear in the printed output. How do I get SPSS to do the plots I want?

SPSS on zoo assumes that you have requested "high-resolution" plots and that you are using an X-windows terminal on which to display them. If you are running SPSS in non-interactive mode, you will need to tell SPSS not to assume high-resolution graphics are wanted. Put the following SPSS command in your SPSS command file (preferably at or near the top of the file, but certainly before graphs or plots are requested):

        set highres=off.
Return to top