Hi all
Can anyone please advice me how to correct this code, I am basically trying to create and combine serial tables
%macro repeat_comb(levels=);
%do var=1 %to &levels;
%let j=&var-1;
proc sql;
create table s&var as
select a.*,b.flag as L&var
from s&j as a
left join tableD as b
on a.class like b.L&var;
quit;
%end;
%mend;
%repeat_comb(levels=8)
The problem is in creating the second variable (j) and using it to refer to tables s&j which is returing error
Best regards
Replace
%let j=&var-1;
with
%let j=%eval(&var-1);
PG
Thank you PGSats
best regards
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.