Don't forget to create account on our site to get access to more material made only for free registered user.  
SAS A00-211 Certification SAS A00-212 Certification Questions and Answers SAS A00 240 Certification Material SAS A00-250 Exam Material Certification SAS Packaged Solutions

Question 1 :  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?

1.     Delete the word THEN on the IF statement.

2.    Add a semicolon at the end of the SET statement.

3.   Place quotes around the value on the IF statement.

4.    Add an END statement to conclude the IF statement

Correct Answer 2 :

Exp : 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.
What SET Does
Each time the SET statement is executed, SAS reads one observation into the program data vector. SET reads all variables and all observations from the input data sets unless you tell SAS to do otherwise. A SET statement can contain multiple data sets; a DATA step can contain multiple SET statements. See Combining and Modifying SAS Data Sets: Examples.

The SET statement is flexible and has a variety of uses in SAS programming. These uses are determined by the options and statements that you use with the SET statement:
 reading observations and variables from existing SAS data sets for further processing in the DATA step
 concatenating and interleaving data sets, and performing one-to-one reading of data sets
 reading SAS data sets by using direct access methods.

You have no rights to post comments