Submitting SAS Commands

Doug Hemken

December 2017

SAS Notes

Interacting with SAS

On SSCC computers you can submit SAS programs in either batch mode or interactive mode. Most of our users work in batch mode on the linstat servers, and in interactive mode on the Winstat servers. If you are trying to develop your SAS code interactively, the Windows user interface is a bit more intuitive and graceful than the linux user interface.

The advantage of working in interactive mode is that is allows you to write and submit smaller units of code, focusing on one step at a time. The disadvantage is that you can lose track of where the step you are working on fits into the larger picture of your project.

We think it is perfectly normal to work both ways! Really good code will work either in either mode.

The notes that follow are mostly about working with SAS in interactive mode under Windows.

Starting SAS

On SSCC Windows computers you can start SAS three ways.

The one important difference between these options will be the default folder where SAS looks for additional files.

If you launch SAS from the Start menu the interface that opens will look something like this:

Start
Start

(The default directory here is "U:\SAS64", indicated in the status bar at the bottom of the SAS window.)

There are five sub-windows available in this main window, three of which are visible when you start: an Explorer, a Log, and an Editor. The Editor is where we write and submit SAS code.

Writing and Submitting code

Once you have written your SAS code in the Editor (a.k.a. "Enhanced Editor"), you "submit" it to the SAS processor. You can submit code via the menus, via the toolbar, or with a shortcut key.

When you submit code, SAS echos your code to the Log window along with notes about processing (including ERROR messages). If statistical tables or graphs are produced, these pop to the front in the Results Viewer, hiding your Editor and Log windows.

(Just because you see Results does not guarantee your program is error- free, a point we will return to later.)

Toolbar

On the toolbar (if the Editor is the active window) is an icon for a Running Programmer. Clicking on that has the same results as using Run -> Submit.

Shortcut Keys

Finally, you can submit code using the F3 or F8 keys at the top of your keyboard. These give you the same results as the menu or toolbar options.

Results Viewer
Results Viewer