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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.