Editing & Debugging Sas Programs 1
Editing & Debugging Sas Programs 1
DEBUGGING SAS
PROGRAMS
IMPORTANCE OF DEBUGGING IN SAS PROGRAM
In general, SAS uses color-coding system to display right (BLUE) and wrong
After submitting the program, go to SAS Log to check if there are ‘red’ error
messages.
ERROR MESSAGES IN SAS LOG
I. Syntax error
II. Smatic error
III. Execution time error
IV. Data error.
SYNTAX ERROR : -
Syntax errors occur when program statements do not conform to the rules
of the SAS language. Here are some examples of syntax errors:
• misspelled SAS keyword
• unmatched quotation marks
• missing a semicolon
• invalid statement option
• invalid data set option.
SEMANTIC ERRORS : -
Semantic errors occur when the form of the elements in a SAS statement is correct,
but the elements are not valid for that usage. Semantic errors are detected at compile
time and can cause SAS to enter syntax check mode.
Examples of semantic errors include the following: