Ten thousand macro variables of symputx + symget looks very fast and easy.
146 data _null_;
147 do i=1 to 10000;
148 call symputx(catt('n',i),i);
149 end;
150 run;
NOTE: DATA statement used (Total process time):
real time 0.06 seconds
cpu time 0.06 seconds
151
152 data tmp;
153 do i=1 to 10000;
154 x=symget(catt('n',i));
155 output;
156 end;
157 run;
NOTE: The data set WORK.TMP has 10000 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.06 seconds