SAS certification author will correct the error in one answer choice but then introduce another error. So when you select you answer make sure that none of the other answer choices can be the correct answer.
Q. The SAS DATA SET temp has 100 observation and v1, v2, v3 and v4 variables. Which SAS DATA STEP writes only the variables v1, v2 and v3 to both SAS data sets One and Two?
A. DATA one two;
SET temp;
KEEP v1 v2 v3
RUN;
B. DATA one (keep v1 v2 v3) two;
SET temp (keep = v1 v2 v3);
RUN;
C. DATA one two;
SET temp (keep v1 v2 v3);
RUN;
D. DATA one two;
SET temp (keep = v1 v2 v3);
RUN;
This looks like an easy question but if you don’t pay attention, you might choose A as your answer without realizing that a semicolon is missing in the KEEP statement. You might choose B or C as your answer without realizing an equal to sign is missing in KEEP dataset option. The last choice D is the correct answer, as it does not have any syntax error and does what the questions is asking. So before you pick any answer, rule out all other options before making it your final choice.
Silly mistakes cost the most. Thanks
ReplyDeleteNice example. Thanks
ReplyDelete