全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1337 0
2014-10-23
使用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!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群