The following SAS program is submitted:
data work.totalsales (keep = monthsales{12} );
set work.monthlysales (keep = year product sales);
array monthsales {12} ;
do i=1 to 12;
monthsales{i} = sales;
end;
run;
set work.monthlysales (keep = year product sales);
array monthsales {12} ;
do i=1 to 12;
monthsales{i} = sales;
end;
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?
A. The program fails execution due to data errors.
B. The program fails execution due to syntax errors.
C. The program executes with warnings and creates the WORK.TOTALSALES data set.
D. The program executes without errors or warnings and creates the WORK.TOTALSALES data set.
A. The program fails execution due to data errors.
B. The program fails execution due to syntax errors.
C. The program executes with warnings and creates the WORK.TOTALSALES data set.
D. The program executes without errors or warnings and creates the WORK.TOTALSALES data set.
3 comments:
Answer: B
monthsales {12} is a wrong way to represent in the keep option…it should be monthsales1-monthsales12.
data work.totalsales (keep = monthsales{12} );
monthsales {12} is a wrong way to represent in the keep option…it should be monthsales1-monthsales12.
data work.totalsales (keep = monthsales1 - monthsales12)
Thanks for your informative blog!!! Keep on updating your with such awesome information.
SAS Online Training
Tableau Online Training|
R Programming Online Training|
Post a Comment