I have created a list of macro variables in a PROC SQL without error. When I create the macro variables I have a list of parameters (costval) that I have created previosuly in the job. I cannot hard code these values because they may change and I want the flexibility to pick up any new ones that are added. I am having trouble getting the syntax right to get these values to resolve in a DATA step further down the line. How do I get these costvals to resolve? Any help would be appreciated.
proc sql noprint ; select %do i = 1 %to &costvars ; sum(CC_&&costval&i), %end ; count(*), sum(TotalGTM) into %do i = 1 %to &costvars ; :ccE&&costval&i, %end ; :ccETotal, :ccEmptyGTM from work.emptycc ; quit ;
... View more