Base SAS 6

Which one of the following statements is true regarding the SAS automatic _ERROR_ variable?
A. The _ERROR_ variable contains the values 'ON' or 'OFF'.
B. The _ERROR_ variable contains the values 'TRUE' or 'FALSE'.
C. The _ERROR_ variable is automatically stored in the resulting SAS data set.
D. The _ERROR_ variable can be used in expressions or calculations in the DATA step.
Click Comment link to get answer

24 comments:

  1. You can write the values of SAS automatic variables to the SAS log to help you analyze your program and data. Your code can test the values of SAS automatic variables to direct conditional execution of DATA step statements.
    Automatic variables are temporary and SAS does not store them in the data sets it creates. To save the value of an automatic variable, assign its value to a data set variable.

    When to use:
    Always review the SAS log to look for notes indicating that _ERROR_ was set to 1.
    Set _ERROR_ to 1 in your code for errors you want flagged in the SAS log. FIRST.variable Indicates whether the data values being processed are from the first observation in a BY group where: variable is the BY-group variable to examine.

    ReplyDelete
  2. Answer is B and D..

    ReplyDelete
  3. Answer is no B, because the value is 1 or 0

    ReplyDelete
  4. The answer is A as on off means 0 or 1 and _error_ stores the value 1 when there is error or intitalizes it to 0 when no error is there.

    ReplyDelete
  5. answer is D.
    both A and B are wrong because the question says the value of _ERROR_ is'ON' or "OFF' it refers to the word on and off not logical valu 0 and 1.

    Similar explanation for B also

    ReplyDelete
  6. The answer is for sure D, because _ERROR_ can be used in calculations or expressions. it is represented by 1 or 0

    ReplyDelete
  7. agreed that it cannot literally take on the values of on/off or true/false if it is 0/1 so d

    ReplyDelete
  8. answer is d I think

    ReplyDelete
  9. Automatic variable is kind logical expression _ERROR_ represented values eitther o (or)1

    ReplyDelete
  10. ans is c. if it show error . the variable name will be stored but the obs for that will not be delivered. so i think ans is c....

    ReplyDelete
  11. _N_ and _ERROR_ are not written to the data set.

    ReplyDelete
  12. A is the answer because other answer are not tangible

    ReplyDelete
  13. Sakar Sham

    Answer is D, in data vector _n_ and _Error_ created and as the error flag that step is done, so it is part in calculation.

    ReplyDelete