@Emet wrote:
Thanks for the responses across the thread.. Your comments are very helpful as I am a new SAS user.
Actually, I am interested to use arrays and I wanted to know if functions like N, Nmiss, Sum would simply work.
e.g. B= sum(A [i] )
it didn't work this way but I will try adding of as Tom suggested.
Best,
If you call the SUM() function with only one argument then you should just be using an assignment statement. So your statement is the same as :
b=a[i];
If you want to sum all of the variables in an array you can use * as the index to get a variable list that consists of all of the variables in the array. To use a variable list in a function call you need the OF keyword.
sum_a = sum(of a[*]);
... View more