70.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;
—–
22
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?
A. (drop Month Quantity Cost)
B. (drop Month, Quantity, Cost)
C. (drop=Month, Quantity, Cost)
D. (drop=Month Quantity Cost)
Answer: D
我运行了一段相似的代码, 显示drop statement有误,
391 data work.january;
392 set sasuser.sales (keep=lastname month Residential Commercial);
393 if month='JAN' then output work.january;
394 sales=Residential+Commercial;
395 (drop=residential commercial);
-
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
396 format sales dollar12.2;
397 run;



雷达卡




京公网安备 11010802022788号







