我有四个逗号分隔的文件:mar2009.txt、mar2010.txt、mar2011.txt 和 mar2012.txt
我正在尝试清理我的库并动态导入这些数据集:
libname my "C:\Users\Owner\Desktop\SAS\";
data A; // I do not this step but if I do not use it the the "do" becomes red in color
do i = 2009 to 2012;
proc datasets library=my;
delete mar.&i;
run;
proc import out=my.mar.&i datafile="C:\Users\Owner\Desktop\SAS\mar.&i.txt" dbms=dlm replace;
delimiter='2c'x;
getnames=yes;
datarow=2;
run;
end;
run;