1
파일 이름이있는 데이터 세트가 있습니다. 이 파일 이름은 텍스트 파일이며 모든 파일을 포함하는 마스터 데이터 세트를 가져 오려고합니다.데이터를 여러 파일에 프로그래밍 방식으로 설정하십시오.
%macro create_data();
proc sql noprint;
select count(*) into :count from Filenames;* Filenames is dataset with Filenames;
select fname into :filelist separated by " " from Filenames ;
quit;
%do i = 1 %to &count.;
*import file iteratively;
proc import datafile='c:\temp\filelist[i].txt' *stuck here;
out=subset
dbms=dlm
replace;
delimiter=' ';
run;
*stuck here as well. Trying to concatenate datasets iteratively to create master;
data master;
set subset;
run;
%end;
%mend;