SAS_Institute
A00-211 · Question #151
After a SAS program is submitted, the following is written to the SAS log: 105 data january; 106 set allmonths(keep = product month num_sold cost); 107 if month = `Jan' then output january; 108…
The correct answer is A. keep product sales. See the full explanation below for the reasoning.
Question
After a SAS program is submitted, the following is written to the SAS log:
105 data january; 106 set allmonths(keep = product month num_sold cost); 107 if month = `Jan' then output january; 108 sales = cost * num_sold; 109 keep = product sales; ------ ERROR 22-322: Syntax error, expecting one of the following:!, !!, &, *,**, +, -,/, <,< =, <>, =, >, ><, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR,^=,|,II, 110 run; What changes should be made to the KEEP statement to correct the errors in the LOG?
Options
- Akeep product sales;
- Bkeep product, sales;
- Ckeep = product, sales;
- Dkeep = (product sales);
How the community answered
(58 responses)- A72% (42)
- B9% (5)
- C3% (2)
- D16% (9)
Community Discussion
No community discussion yet for this question.