Statistical Analysis System (SAS) Programming Certification Practice Exam

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare effectively for the SAS Programming Certification Exam. Access flashcards and multiple choice questions, with hints and detailed explanations. Ace your exam confidently!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What is the value of the automatic variable _ERROR_ after processing an observation with an error?

  1. 0

  2. 1

  3. 2

  4. 3

The correct answer is: 1

The automatic variable _ERROR_ in SAS is designed to indicate whether an error occurred during the processing of an observation. When SAS processes a data step, it automatically sets _ERROR_ to a value that reflects the status of that observation. If no errors are encountered during the processing of an observation, _ERROR_ is set to 0. However, when an error occurs—such as an invalid value, a missing value where one is not allowed, or an arithmetic operation that leads to an undefined result—SAS will set _ERROR_ to 1. This signaling allows programmers to quickly diagnose issues within their data processing routine. Given that the question specifies that an observation is being processed with an error, the correct answer, which reflects this condition, is that _ERROR_ would be set to 1 after processing that particular observation. This automatic feedback mechanism is crucial for debugging and ensuring data integrity in SAS programming tasks.