使用SAS导入某一文件中同一类型的某个时间段的文件。代码如下:%macro t(dt,f,t);
data &dt;
do i = &f to &t;
nextfile=compress("F:\data\"!!(put(i,yymmddN8.)!!".log"));
do until(lastobs);
infile in filevar = nextfile end = lastobs dlm=',]}"' encoding="utf-8" missover lrecl=1000;
input
@'[' dt anydtdtm19.
#1 @'level":' level :best12.
#1 @'role_level":' rank :best12.
#1 @'account_id":"' furs :$40. ;
if date > &f and date <= &t then output ;
end;
end;
drop i;
stop;
run;
%mend t;
提示ERROR:需要旧行1,但SAS在第2行中。如果不使用宏,一个文件一个文件读,就不会报错,为什么呢?请求高人帮助!HELP!