What is true about ERROR variable?

  1. d.) Will have values “TRUE” or “FALSE”

  2. c.) Will have values “YES” or “NO”

  3. b.) This variable appears in output dataset

  4. a.) Can be used in assignments/calculation in datastep.


Correct Option: D

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Will have values "TRUE" or "FALSE" - This option is incorrect. The variable "ERROR" does not have values of "TRUE" or "FALSE". It is a system variable that is automatically created in the DATA step only when an error occurs during the execution of a SAS program.

Option B) Will have values "YES" or "NO" - This option is incorrect. The variable "ERROR" does not have values of "YES" or "NO".

Option C) This variable appears in the output dataset - This option is incorrect. The variable "ERROR" does not appear in the output dataset. It is a temporary system variable that is used internally by SAS to manage errors during program execution.

Option D) Can be used in assignments/calculation in the data step - This option is correct. Although "ERROR" is a system variable, it can be used in assignments and calculations in the DATA step. It allows you to check for errors during program execution and perform specific actions based on the presence or absence of errors.

The correct answer is D) Can be used in assignments/calculation in the data step. This option is correct because "ERROR" is a system variable that can be used in assignments and calculations in the DATA step.

Find more quizzes: