SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Editing and Debugging SAS Programs
Resolving Common Problems


Missing Semicolon

One of the most common errors is omitting a semicolon at the end of a statement. The program below is missing a semicolon at the end of the PROC PRINT statement.

     data clinic.admitfee;
        set clinic.admit;
     run;
     proc print data=clinic.admitfee
        var id name actlevel fee;
     run;
When you omit a semicolon, the SAS System reads the statement with the missing semicolon, and the following statement, as one long statement. The SAS log then lists errors that relate to the combined statement, not the actual mistake (the missing semicolon).


SAS Log


Resolving the Problem

To correct the error, do the following:

  1. Recall the program to the Program Editor window.
  2. Find the missing semicolon and add it. You can usually locate the statement where the semicolon belongs by looking at the underscored keywords in the error message and working backwards.
  3. Resubmit the corrected program.
  4. Check the Log window again to make sure that there are no other errors.

back||next


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

Terms of Use & Legal Information | Privacy Statement