I am using SAS 9.4 I would like to sum a number of variables, pop1 to popNN, where the greatest number, NN, will differ with every run. Is there a way to reference a number dynamically in a sum(of pop1--popNN) function? Can I use a macro variable here, like sum(of pop1--pop¯ovariable.) ? thanks.
... View more