| CIRCA Unix
Services
This handout can be found online at: | Using SAS on Grove August 23, 2005 |
SAS is a comprehensive statistical analysis system that runs on many computers, including PCs in CIRCA's public labs and the IBM mainframe at CNS. SAS is currently available on grove, CIRCA's Unix system.
The simplest way to use SAS is to create a SAS program and data in a file using your favorite text editor. It's not required, but you should name the file containing the SAS program with a "sas" suffix, for example:
myjob.sasA typical SAS file will contain a data step, some data, and SAS procedures. This might look like this:
data; input variable names; cards; your input data goes here proc some-sas-procedure;When you've finished creating and editing the file, run the SAS program by typing:
sas myjobNote that SAS assumes that the full name of the input file is myjob.sas.
SAS always creates a log file that describes what happened when the job executed. The name of the log file is the same as the input file with a suffix of log. The previous example would create the file myjob.log. You can use the more command to display the file:
more myjob.logThere will be an additional output file if any SAS procedures were executed. This file has the same name as the input file with a suffix of lst. Procedure output from the previous example can be found in the file myjob.lst.
You can also print the log or listing files on the CIRCA lab printers. The Unix printconfig command can be used to assist you to setup optional payed printing in the labs.
SAS can also be used interactively on ordinary terminals using the SAS Display Manager. The display manager mode is started by entering the sas command without a file name:
sasThe display manager mode is too complex to document in this short handout. If you find yourself in the display manager, you can exit back to the Unix prompt by moving the cursor to a command line and entering the endsas command:
Command ===> endsas