PROC SORT sorts the observations by the variable Section. This is required to use Section as a BY variable in the PROC MEANS step.
proc sort data=Grade out=GradeBySection;
   by section;
run;