@Kurt_Bremser @Shmuel There are two places that utilize this _n_ datastep variable in proc sql, so I guess I need to convert these two proc sqls into datasteps. The first one is from line 510 to 515 as you mentioned in earlier post and the other one would be from line 595 to 601. I have the datastep for the first one as below data _null_;
set Filenames_parse (obs=1);
string = trim(left(tranwrd("&tablename.",'_','-')||'-'||substr(put(dateinfo,8.0),1,4)||'-'||substr(put(dateinfo,8.0),5,2)||'-'||su
bstr(put(dateinfo,8.0),7,2)))||'.csv';
call symput('importfilename',string);
run; and the second one is like this data _null_;
set Filenames_parse (_n_ = &n);
string = trim(left(tranwrd("&tablename.",'_','-')||'-'||substr(put(dateinfo,8.0),1,4)||'-'||substr(put(dateinfo,8.0),5,2)||'-'||su
bstr(put(dateinfo,8.0),7,2)))||'.csv';
call symput('importfilename',string);
run; I ran the new script and still got the same error. As I mentioned I am very new to SAS so please bear with me. Thank you for your help.
... View more