Sort the GRADE data set. PROC SORT sorts the observations by the variable Section. Sorting is required in order to use Section as a BY variable in the PROC MEANS step.


proc sort data=Grade out=GradeBySection;
   by section;
run;