| 1 | %macro AHGvar2arr(dsn,var,arrPre,dim=100); |
| 2 | %AHGdel(&arrpre,like=1); |
| 3 | %global &arrPre._n; |
| 4 | %local i; |
| 5 | %DO i=1 %to &dim; |
| 6 | %global &arrPRE&i; |
| 7 | %END; |
| 8 | DATA _null_; |
| 9 | SET &dsn END=END; |
| 10 | call symput(strip("&arrpre"||%AHGputn(_n_)),strip(&var)); |
| 11 | IF END THEN call symput("&arrPre._n",strip(put(_n_,best.)) ); |
| 12 | RUN; |
| 13 | %mend; |