How do I use SAS on Karst at IU?

At Indiana University, SAS is available on the Karst clusters. You can run SAS interactively, non-interactively, or as a background process.

On this page:


Adding SAS to your user environment

To add SAS to your user environment, load the SAS module:

  module load sas

To make permanent changes to your environment, edit your ~/.modules file. For more, see In Modules, how do I save my environment with a .modules file?

For more about using the Modules package, see On the research computing systems at IU, how do I use Modules to manage my software environment?

Running SAS interactively

To run SAS interactively, on the command line, enter:

  sas -nodms

When SAS initializes, the SAS command prompt (1?) will display. The number appearing with the question mark in the prompt will increase with each subsequent command line. Enter your command(s) and terminate each SAS command with ; (semicolon). For example, to execute a statement, enter:

  run;

To end the session, at the SAS prompt, enter:

  endsas;

Running SAS in non-interactive mode

To run a SAS job non-interactively, on the command line, enter:

  sas program.sas 

Replace program.sas with your SAS program's filename. When the job has been executed, two new files will exist in your default directory. The SAS log, program.log, will contain the code that was run along with any notes, warnings, or errors that resulted during execution. The listing report, program.lst, will contain output from the program, if any. In both cases, program represents the name of your SAS program file. If your program file contains errors, the .lst file may not be generated.

Running SAS as a background process

When you run a non-interactive job, your terminal is not free for other computing tasks until the job is completed. If you want to use your terminal for computing activities while the job runs in the background, include & (ampersand) at the end of the command:

  sas program.sas &

Again, replace program with the name of your SAS program.

This will free your terminal for other computing tasks while the job runs in the background. When the job is completed, a message will be displayed on the screen, and the .log and the .lst files will be stored in the default directory.

Getting help

UITS Research Analytics provides a Getting Started with SAS for Unix tutorial (in PDF format).

If you have questions about using statistical and mathematical software at Indiana University, contact Research Analytics. Research Analytics is located on the IU Bloomington campus at Woodburn Hall 200; staff are available for consultation Monday-Friday 9am-noon and by appointment.

This is document agik in the Knowledge Base.
Last modified on 2018-06-11 14:05:56.

Contact us

For help or to comment, email the UITS Support Center.