If you'd raised this in the Enterprise Guide forum my answer would have been slightly different, although the result would be the same.
It seems you want to perform a frequency analysis, you want a percentage for the frequency as a proportion of the population, and you want to perform it separately for each level of a variable that classifies a group to observe.
In Enterprise Guide there is a standard analysis task that will do everything for you. In Foundation SAS, your can simply run code similar to the following:
Proc Freq Data = MYLIB.MYDATA Missing;
Tables CLASSVAR;
Run;
This will produce frequencies for each level of classvar, and percentages for each class as well as the whole population.
Kind regards
David
... View more