Diagnosing Errors
Examples in This Section
Many of
the programs in this section use university test scores to illustrate
errors in the SAS log. Other programs in this section use other data.
Diagnosing Syntax Errors
When SAS Detects a Syntax Error
The SAS Supervisor detects syntax errors as it compiles
each step, and then SAS does the following:
-
writes the word ERROR to the log
-
identifies the error's location
-
writes an explanation of the error
Example: Missing Semicolon and Misspelled Keyword
In the following program,
the CHART procedure is used to analyze data. Note that a semicolon
in the DATA statement is omitted, and the keyword INFILE is misspelled.
libname out 'your-data-library';data out.error1
infill
'your-input-file ...
Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.