SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Editing and Debugging SAS Programs
Resolving Common Problems


Missing RUN Statement

Each step in a SAS program is compiled and executed independently from every other step. As a step is compiled, SAS recognizes the end of the current step when it encounters a

  • DATA or PROC statement, which indicates the beginning of a new step
  • RUN statement, which indicates the end of the current step.

When the program below is submitted, the DATA step executes, but the PROC step does not. The PROC step does not execute because there is no following DATA or PROC step to indicate the beginning of a new step, nor is there a following RUN statement to indicate the end of the step.

     data clinic.admitfee;
        set clinic.admit;
     run;
     proc print data=clinic.admitfee;
        var id name actlevel fee;
Because there is nothing to indicate the end of the PROC step, the PRINT procedure waits before running and a "PROC PRINT running" message appears at the top of the active window.

Program Editor Window


Resolving the Problem

To correct the error, submit a RUN statement to complete the PROC step.

     run;

You do not need to recall the program to the Program Editor window.


back||next


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

Terms of Use & Legal Information | Privacy Statement