The OUTPUT statement outputs the mean for Score and FinalGrade to variables of the same name. The median final grade is output to the variable MedianGrade. The WHERE= data set option restricts the observations in SUMDATA. One observation contains overall statistics (_type_=0). The remainder must have a status of 1.
   output out=Sumdata (where=(status='1' or _type_=0))
          mean= median(finalgrade)=MedianGrade;