Diagnosing and Avoiding Errors |
SAS recognizes four kinds of errors:
Syntax errors are errors made in the SAS statements of a program. They include misspelled keywords, missing or invalid punctuation, and invalid statement or data set options. SAS detects syntax errors as it compiles each DATA or PROC step.
Execution-time errors cause a program to fail when it is submitted for execution. Most execution-time errors that are not serious produce notes in the SAS log, but the program is allowed to run to completion. For more serious errors, however, SAS issues error messages and stops all processing.
Data errors are actually a type of execution-time error. They occur when the raw data that you are analyzing with a SAS program contains invalid values. For example, a data error occurs if you specify numeric variables in the INPUT statement for character data. Data errors do not cause a program to stop but instead generate notes in the SAS log.
Semantic errors, another type of execution-time error, occur when the form of a SAS statement is correct, but some elements are not valid in that usage. Examples include the following:
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.