SAS Base Programming for SAS 9 — Question 10

After a SAS program is submitted, the following is written to the SAS log:
105 data WORK.JANUARY;
106 set WORK.ALLYEAR(keep=Product Month Quantity Cost);
107 if Month='JAN' then output WORK.JANUARY;
108 Sales=Cost * Quantity;
109 drop=Month Quantity Cost;
-----
ERROR 22-322: Syntax error, expecting one of the following: !,
!!, , *, **, +, -,
, <=, <>, =, >, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR, ^=, |, ||, ~=.
110 run;
What data set option could be attached to WORK.JANUARY to replace the DROP statement that generated the error in the log?

Answer options

Correct answer: D

Explanation

The correct answer, D, correctly uses the syntax for a data set option to drop variables without causing a syntax error. Option A is incorrect because it lacks the '=' sign, option B incorrectly uses a comma between variable names, and option C also incorrectly uses a comma, which is not valid in this context.