Hi, i ran this code for other excel and works perfectly. The problem is im trying to do the same with other excel and have this problem on the log. libname MYLIB pcfiles type=excel path="I:\blabla\blabla\blablabla\blablabla.xlsx";
proc sql;
create table TABLE1
as select *
from dictionary.tables
where libname="MYLIB";
quit;
proc sql;
select MEMNAME
into :NAMELIST separated by '*'
from TABLE1;
quit;
proc sql;
select count(MEMNAME)
into :NUM
from TABLE1;
quit;
%put &NAMELIST;
%put #
%macro MYLOOP;
%do i=1 %to #
%let NAME1=%scan(&NAMELIST,&i,*);
%let NAME2=%substr(&NAME1,1,%length(&NAME1)-1);
data &NAME2;
set MYLIB."&NAME1"n;
if missing(cats(of _all_)) then delete;
run;
%end;
%mend MYLOOP;
%MYLOOP 43 %macro MYLOOP;
44 %do i=1 %to #
45 %let NAME1=%scan(&NAMELIST,&i,*);
46 %let NAME2=%substr(&NAME1,1,%length(&NAME1)-1);
47
48 data &NAME2;
49 set MYLIB."&NAME1"n;
50 if missing(cats(of _all_)) then delete;
51 run;
52 %end;
53
54 %mend MYLOOP;
55
56 %MYLOOP
ERROR: Literal contains unmatched quote.
ERROR: The macro MYLOOP will stop executing. Why can this happen? how can i fix it? Thank you very much in advance
... View more