ArtT has a good suggestion, but I also have a couple of thoughts. 1. Do you really need the values in a macro variable? Your function is working against DATA step variables so if we can go against those directly it might help. 2. your DATA _NULL_ step to create the macro variables is a bit convoluted. A SQL step is more straightforward. Consider: proc sql noprint; select actualvalues,_edf_ into :actlist separated by ' ', :emplist separated by ' ' from temp; quit; %put &actlist; %put &emplist; 3. If you do really need arrays, and we have not seen enough of what you are doing yet to know for sure, then you might consider skipping the macro language and going to either DATA step arrays or hash tables, neither have the size limitations of macro variables (64K).
... View more