In my statement, the 10 cases mean the sample size is the 10.
Yes, your right. it can be done in the data step as you said. But I don't think it is smart way.It also can be done using the function of sum.
It is difficult to deal with it as your method. Becasue there are 25 variables. If there are more than 300 variables. It is more difficlut. I want to use a loop to deal with it based on macro language.