Hello Everyone,
I run a simple macro to import and sql to main file.
To my surprise, Studio give a weird notice and I cant understand why it is like that.
Yes, I replace the &text_to_sub with B to check and it works.
To make matter worse, after that, no code run, I got to logout and log back in to get SAS run code.
Below is my code and the notice I got.
Please help.
HHCFX
%macro my3macro (text_to_sub=);
proc import datafile="/..../Week6_HW1.xlsx"
out= &text_to_sub
dbms=xlsx
replace;
sheet="&text_to_sub";
run;
data &text_to_sub; set &text_to_sub;
rename value= &text_to_sub;
run;
proc sql;
create table unit_all
as select *
from unit_all as a left join &text_to_sub as b
on a.day=b.day;quit;
%mend;
%macro my3macro (text_to_sub=B);
%macro my3macro (text_to_sub=);
proc import datafile="/..../Week6_HW1.xlsx"
out= &text_to_sub
dbms=xlsx
replace;
sheet="&text_to_sub";
run;
data &text_to_sub; set &text_to_sub;
rename value= &text_to_sub;
run;
proc sql;
create table unit_all
as select *
from unit_all as a left join &text_to_sub as b
on a.day=b.day;quit;
%mend my3macro;
%my3macro (text_to_sub=B);
%macro my3macro (text_to_sub=);
proc import datafile="/..../Week6_HW1.xlsx"
out= &text_to_sub
dbms=xlsx
replace;
sheet="&text_to_sub";
run;
data &text_to_sub; set &text_to_sub;
rename value= &text_to_sub;
run;
proc sql;
create table unit_all
as select *
from unit_all as a left join &text_to_sub as b
on a.day=b.day;quit;
%mend my3macro;
%my3macro (text_to_sub=B);
Yes, I also just figure it out.
So it works correctly now? If so please mark as answered.
That is not an error.
Just add an option to suppress it.
option noquotelenmax;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.