SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Debugging and Testing DATA Steps
Debugging a DATA Step


Error Recovery

When SAS encounters a syntax error, it tries to interpret your code. If the syntax error can be interpreted, the DATA step continues to be processed.

In the example below, the keyword DATA is misspelled. When the DATA step is submitted for processing, the misspelled word is interpreted as DATA and the DATA step compiles successfully. SAS underlines the detected error, identifies it with a number, and writes a corresponding message in the log.

     daat annual;
        set finance.loans;
        Interest=amount*rate;
     run;

The SAS Log window displays error message.

Note that SAS does not correct the misspelled word in your program. You must correct the error in your program before submitting it again. If no syntax errors are detected or if SAS can interpret the syntax errors, the DATA step compiles and then executes.


back||next


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

Terms of Use & Legal Information | Privacy Statement