나는 네 개의 쉼표 파일 구분이 있습니다 mar2009.txt, mar2010.txt, mar2011.txt 및 mar2012.txtSAS에서 데이터 세트를 동적으로 삭제하고 가져 오는 방법은 무엇입니까?
내 도서관을 정화하고 동적으로 그 데이터 세트를 가져 오기 위해 노력하고 있어요 :
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;
잘못된 방식으로 사용하지 마십시오. 실제로 Little SAS Book과 같은 시작 SAS 책을 읽어야합니다. 매우 기초적인 수준에서 전혀 의미가없는 것들을 여기서 섞어 쓰고 있습니다. – Joe
first - 오픈 코드에서 do 문을 사용할 수 없습니다. 찾고있는 것은 매크로 내에서 % do를 사용하는 것입니다. 나는 Joe와 동의하거나 독서를하거나 온라인 문서를 살펴 본다. – scott