This is an old revision of the document!
Some general information for SAS users.
SAS
SAS, the statistical software, and much more, frequently used in the social sciences, is available on the High Performance Academic Computing Cluster. It is not a parallel version of SAS, but we do offer an unlimited campus wide license for Teaching and Research.
SAS is typically invoked in batch mode by submitting a script (*.sas text file). SAS will generate a log file (*.log) and a listing file (*.lst). The former shows you what is going on, the latter contains the output of invoked procedures.
SAS can be invoked in interactive mode on the head node for debugging and code development if needed. However, this is not supported on compute nodes. Hence if you need to generate graphical output you will have to use SAS/Graphics or the Output Delivery System (SAS/ODS). Examples of code can be found at a variety of locations:
- SAS/ODS examples http://sas.wesleyan.edu/statgraphs/
- SAS/Graphics examples Data Driven Images, Code
- A tutor is available at http://sas.wesleyan.edu/SASOnlineTutor/sot91/index.htm
Program
So lets generate a little SAS program using a Unix editor like vi/vim, emacs or pico.
- First we generate the input data file
test.dat
1234567890 0987654321 2468097531
- Next a simple SAS file
test.saswhich does the obvious
options nocenter; filename test './test.dat'; data one; infile test; input @2 x 3.1 @6 y 3.1; total = x * y; run; proc print; run;
- Lets test it by submitting on head node
[root@greentail sas]# ll total 8 -rw-r--r-- 1 root root 33 Dec 21 10:16 test.dat -rw-r--r-- 1 root root 140 Dec 21 10:22 test.sas [root@greentail sas]# sas test [root@greentail sas]# cat test.lst The SAS System 10:24 Wednesday, December 21, 2011 1 Obs x y total 1 23.4 67.8 1586.52 2 98.7 54.3 5359.41 3 46.8 97.5 4563.00
