hello,
you can try to use a data step and:
- pass all the files you want to be exported as location\input data;
- use macro variables to store the input data;
- build an external, temporary file to store the syntax;
- use %include Statement
[pre]
/* files build for checking the syntax*/
data x x1;
set sashelp.class;
output x;
set sashelp.class end=done;
output x1;
if done then do;
name='a';
output x1;
end;
run;
filename test temp;
data _null_;
input filen $35. ;
file test;
call symput (cats('z',_n_),scan(filen,1,'\','b'));
q=symget(cats('z',_n_));
put "data _null_;";
put "set " q ";";
put 'file "' filen '" dsd;';
put "put name age;";
put "run;";
datalines;
location to store\x
location to store\x1
run;
%include test;
[/pre]
HTH,
Marius