The 64-bit version of SAS 9.4 available on the Katana cluster. As with all software on the clusters you will need to load SAS using the module command either manually or in by adding it to your
.bashrc before running it.
By default SAS will store temporary files in
/tmp which can easily fill up leaving the node offline. In order to avoid this we have told SAS to use $TMPDIR to save temporary files in /var/tmp on the Katana head node and local scratch on compute nodes. If you wish to save temporary files to a different location you can do that by either adding
-work /my/directory to your SAS command and it will automatically put the files in the correct location or adding the line
to your sasv9.cfg file.
If you have made a ssh connection to the cluster from Linux or a system that supports X Windows then you can open a graphical SAS session using the following commands. Note: You can only run a graphical session if you have started an interactive job.
qsub -I module add sas sas
Most (if not all) of the time that you use SAS you should use it in "line mode" which can be called by adding the
-nodms flag to your SAS command. For example if you wish to start SAS interactively you can type the following.
qsub -I module add sas sas -nodms
If you have a SAS program called
program.sas then you can open the program in SAS by using the command
sas program.sas. In an interactive session (which is a good way of confirming that your SAS program will work when called by a job script) you would type the following. Note: Loading a program in SAS or sending input to SAS causes SAS to automatically use line mode so you don't need to use the
qsub -I module add sas sas program.sas
If you want to send input into the SAS program you can pipe it to the SAS command in the following way.
cat myinput.txt | sas program.sas
Finally if you wish to pass parameters to your SAS script you should add "
-sysparm 'A B C'" after to your SAS command where A, B and C are parameters.
If you run any SAS program by using
sas program.sas then by default SAS will leave a 'myprog.lst' and a
'myprog.log' file in the directory that you ran SAS from containing logs and results from the running pf the program.
Some examples of job scripts that call SAS programs are shown lower in the page.