ElearnSAS.com

ElearnSAS.com
SAS Learning Platform

Base SAS 12

A SAS program is submitted and the following SAS log is produced:
2 data gt100;
3 set ia.airplanes
4 if mpg gt 100 then output;
22 202
ERROR: File WORK.IF.DATA does not exist.
ERROR: File WORK.MPG.DATA does not exist.
ERROR: File WORK.GT.DATA does not exist.
ERROR: File WORK.THEN.DATA does not exist.
ERROR: File WORK.OUTPUT.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name,
a quoted string, (, ;, END, KEY, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
5 run;
The IA libref was previously assigned in this SAS session.
Which one of the following corrects the errors in the LOG?
A. Delete the word THEN on the IF statement.
B. Add a semicolon at the end of the SET statement.
C. Place quotes around the value on the IF statement.
D. Add an END statement to conclude the IF statement.
Click Comment link to get answer

16 comments:

  1. Anonymous1:06 AM

    The answer is B

    ReplyDelete
  2. In SET statement semicolon is missing, so SAS is considering each word after SET as a separate data set which is creating an Error.

    So Placing the semicolon in SET statement will serve the purpose.

    ReplyDelete
    Replies
    1. Anonymous3:14 AM

      I agree and good explaination

      Delete
    2. Anonymous5:31 PM

      true

      Delete
  3. Anonymous2:21 AM

    semicolon is missed in the set statement

    ReplyDelete
  4. swapna7:17 PM

    the answer is B

    ReplyDelete
  5. Anonymous7:45 PM

    answer is B

    ReplyDelete
  6. I agree with sharad's reasoning , the answer is B

    ReplyDelete
  7. Anonymous5:20 PM

    GM;;;
    B

    ReplyDelete
  8. this is the log file error for me so answer is D
    gclub
    gclub casino online

    ReplyDelete
  9. Very nice article,Keep Updating more posts with us.
    Thank you..
    MSBI Online Course

    ReplyDelete
  10. Keep Posting Such Nice Article On MSBI Certification

    ReplyDelete