SAS Base Programming for SAS 9 — Question 58
The following SAS program is submitted:
data work.sets;
do until (prod gt 6);
prod + 1;
end;
run;
What is the value of the variable PROD in the output data set?
Answer options
- A. 6
- B. 7
- C. 8
- D. (missing numeric)
Correct answer: B
Explanation
The loop continues until the condition 'prod gt 6' is met, meaning it will run until PROD is incremented to 7. Therefore, when the loop exits, the value of PROD is 7. Options A, C, and D are incorrect as they do not reflect the final value of PROD after the loop completes.