SAS_Institute
A00-211 · Question #111
The following SAS program is submitted: data work.totalsales; set work.monthlysales(keep = year product sales); retain monthsales {12} ; array monthsales {12} ; do i = 1 to 12; monthsales{i} =…
The correct answer is B. The program fails execution due to syntax errors. See the full explanation below for the reasoning.
Question
The following SAS program is submitted:
data work.totalsales; set work.monthlysales(keep = year product sales); retain monthsales {12} ; array monthsales {12} ; do i = 1 to 12; monthsales{i} = sales; end; cnt + 1; monthsales{cnt} = sales; run; The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations. Which one of the following is the result of the above program?
Options
- AThe program fails execution due to data errors.
- BThe program fails execution due to syntax errors.
- CThe program runs with warnings and creates the WORK.TOTALSALES data set with 60 observations.
- DThe program runs without errors or warnings and creates the WORK.TOTALSALES data set with
How the community answered
(36 responses)- A3% (1)
- B78% (28)
- C14% (5)
- D6% (2)
Community Discussion
No community discussion yet for this question.