O'Reilly logo

Step-by-Step Programming with Base SAS 9.4 by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required