Question 7: This item will ask you to provide a line of missing code;
The SAS data set WORK.INPUT contains 10 observations, and includes the numeric variable Cost.
The following SAS program is submitted to accumulate the total value of Cost for the 10 observations:
1 2 3 4 5
data WORK.TOTAL; set WORK.INPUT; <insert code here> Total=Total+Cost; run;
Which statement correctly completes the program?
A. keep Total; B. retain Total 0; C. Total = 0; D. If _N_= 1 then Total = 0;
*The SAS certification sample problem and answer above are sourced from the official SAS sample questions page. All answer logs, data sets, output, and commentary are provided by this blog.