CLASS tells PROC SUMMARY how to divide (some people would say "slice") the data. VAR tells PROC SUMMARY which variables to compute statistics on.
So, look at the output of this:
proc summary data=sashelp.class;
class sex age;
var weight height;
output out=means mean=/autoname;
run;
This finds the mean of weight and height for all values of Sex, it finds the mean of weight and height for all values of Age and it finds the mean of weight and height for all combinations of all values of Sex and Age. It also produces the overall mean for these two variables.
--
Paige Miller