The behavior of the CLASS statement in PROC SURVEYMEANS is different than in PROC MEANS. In PROC MEANS, the CLASS statement allows you to define subgroup combinations for analysis without having to sort the data and do BY-group processing. The CLASS statement in PROC SURVEYMEANS is used to identify numeric analysis variables that you want to treat as categorical (class) variables instead of continuous variables. For a categorical variable, the analysis provides estimates of the proportions of its levels. Without the CLASS statement, character variables are automatically analyzed as categorical, and numeric variables are analyzed as continuous. So, if you have a numeric variable and you want to compute proportions instead of means, specify the variable in both the CLASS and VAR statements.
In PROC SURVEYMEANS, if variables are specified in the CLASS statement but not in the VAR or RATIO statement, then the CLASS statement is ignored.
In PROC SURVEYMEANS, use the DOMAIN statement to specify subgroup or domain variables. Since BY-group processing is generally inappropriate in survey data analysis, you should not sort your data set and use a BY statement in PROC SURVEYMEANS. For additional information on domain analysis, see this note.