Submitting a SAS job on Abacus
Logging on to abacus
Log on to abacus using your standard logon procedure (for most people this
will be via telnet to abacus.nodak.edu).
Creating a SAS program on abacus
Running a SAS program on abacus
- From the UNIX prompt (the $), type: pico prob1.sas (press
Although sas does not require you to use the .sas extension, it is
recommended you use this convention to help organize your SAS files.
- You should now be in the pico text editor. The cursor should be at the
top of the screen. Key sequences are defined at the bottom of the screen.
The carat preceding each key (e.g., ^O) refers to the control key.
To save the contents of your file, hold down the control key and
then press the letter O. To exit from the file (^X), hold down the
control key and then press the letter X.
- Type in the contents of your file. Press the return key to
start a new line. When you have filled all available lines on the screen,
press return to get additional blank lines.
Sample SAS Program
INPUT NAME $ SEX $ AGE HEIGHT WEIGHT;
JOHN M 12 59.0 99.5
ALFRED M 14 69.0 112.5
LOUISE F 18 56.3 77.0
PHIL M 16 72.0 150.0
MARY F 15 66.5 112.0
ROBERT M 12 64.8 128.0
If you wish to have your data in a separate file (e.g. survey.data) you would use the infile
statement as follows:
- When you have entered all of your program, press control O to
save the file. Pico will then bring up a dialog box asking you to either
confirm the name of the current file or to provide a new name for it. Press
return to save the contents with the current name.
- To exit from your file back to the UNIX prompt at any time, hold down
control and press X. Pico will bring up a dialog box asking
you if you want to save the changes to the file (if there have been any).
Simply respond by pressing the letter Y to save the changes or the
letter N to discard the changes.
Viewing the output from a SAS program on abacus
- To execute your SAS program, at the Unix $ prompt type: sas
filename and press return. Note that you need not type the .sas
extension in this command. If you do not follow the convention of the .sas
extension, then you must type the entire name of the file containing the
- If you have made errors in your program, you will have to scan the
saslog file to locate them. By default, the saslog file is given the
extension .log on abacus. For example, for the program file
prob1.sas the saslog file would be prob1.log
Correcting errors, re-running a SAS program on abacus
- Executing a SAS program should also generate a second output file by
default. This file will be named whatever the name of the program file is
with the extension of .lst and will contain the results of the
- To see the output files created by SAS (as well as all other files in
your current directory>, use the ls command. If you only want to see
the output files, type: ls *.l* (press return). The asterisks are
wildcards and refer to all other character combinations in the filename.
- Type: pico prob1.log (press return) to open the saslog file
associated with prob1.sas. Use the control-V and control-Y
key sequences to move forward and backward through the file, respectively.
To search for a character string while editing the file, use the
control-W command to bring up a dialog window where you can specify
the string to locate (like ERROR).
- If you do not find any indications of trouble in the prob1.log
file, exit from the file using control-X and return to the $ prompt.
- Type: pico prob1.lst (press return) to open the listing file
associated with prob1.sas. This opens the prob1.lst file with the
pico text editor. Again, use the control-V and control-Y key
sequences to move forward and backward through the file, respectively. This
file contains the output you are typically interested in.
- When you have finished scanning the prob1.lst file and want to
return to the $ prompt, use control-X.
If you determine from your saslog that your program has errors, follow the steps
Printing SAS output files on abacus
- Edit the original program (i.e., type: pico prob1.sas (press
- Locate the errors in the file. Use the arrow keys to move the cursor to
the location of the errors and type in the corrections.
- After entering all proposed corrections, save the file using
- Use the sas command (e.g. sas prob1) to execute the revised program.
- When the program execution has completed, edit the new saslog and scan
- If your program still has errors, repeat steps 1 through 5 until it
- Printed output will go to your default printer.
- At the Unix $ prompt type: pcprint filename and press return.
Handout prepared by: Information Technology Services (NDSU) - Spring 1996
Copyright 1996 North Dakota Higher Education Computer Network (HECN).
Written or electronic notification is requested for reproduction of this document. For information contact:
ND HECN Information Technology Services
North Dakota State University
P.O. Box 5164
Fargo, ND 58105