SAS Base Programming for SAS 9 — Question 25

The following SAS program is submitted:
data work.january;
set work.allmonths (keep = product month num_sold cost);
if month = 'Jan' then output work.january;
sales = cost * num_sold;
keep = product sales;
run;
Which variables does the WORK.JANUARY data set contain?

Answer options

Correct answer: D

Explanation

The correct answer is D because the syntax for 'keep' is incorrect, which prevents the data set from being created properly. Options A, B, and C are incorrect as they assume that the data set was successfully created, which it was not due to the error.