SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Basic Concepts
SAS Programs


At this point, you've examined the general structure of our sample program. But what happens when you run the program?


Processing SAS Programs

When you submit a SAS program, SAS software reads the statements and checks them for errors.

When it encounters a DATA, PROC, or RUN statement, SAS software stops reading statements and executes the current step in the program. In our sample program, each step ends with a RUN statement.


Executing previous steps in a SAS program

Log Messages

Each time a step is executed, SAS software generates a log of the processing activities and the results of the processing. The SAS log collects messages about the processing of SAS programs and any errors that may occur.

If you submit our sample program, you see the log messages shown below. Notice that you get separate sets of messages for each step in the program.

SAS Log

1    data clinic.admit2;
2       set clinic.admit;
3    run;

NOTE: The data set CLINIC.ADMIT2 has 21
      observations and 9 variables.
NOTE: DATA statement used:
      real time           1.50 seconds
      cpu time            0.07 seconds


4    proc print data=clinic.admit2;
5    run;

NOTE: PROCEDURE PRINT used:
      real time           6.95 seconds
      cpu time            0.07 seconds


back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement