Thank you for a prompt response. As a quick fix, I have created a small macro. But, I am also simultaneously looking into sasautos to get more understanding. %macro declare_macros; %let file_path = &toolkit.; filename dirlist pipe "dir ""&file_path"" /b "; data dirlist; infile dirlist missover pad; input filename $1000.; run; data _null_; set dirlist; id = _n_; call symputx("nobs",strip(id)); call symput('macro' || left(put(_n_, 4.)), trim(filename)); run; %do ii = 1 %to &nobs.; %include "&toolkit.&¯o&ii."; %end; %mend declare_macros;
... View more