我要读入多个文档。文档名为011211.swd,021211.swd,031211.swd,041211.swd,051211.swd等等。
x "dir E:\a\*.swd /b > E:\a\all_swd";
%macro daoru(name) ;
data temp&name.;
infile 'E:\a\&name..swd' ;
length x $100.;
input x $;
run;
%mend;
data _null_;
infile "E:\a\all_swd";
input str:$100.;
call execute(compress('%daoru('||scan(str,6,'.')||');'));
run;
但是似乎&name 没有解析出来。所以报错如下。
ERROR: Physical file does not exist, E:\a\&name..swd.
该如何解决呢??