Hi, I am passing two parameters for the condition but the condition using id parameter highlighted in below is not being executed %Macro Anlsys (tab,id); %put &tab; %put &id; %if &id=T %then %do; Data &tab._New; %if &tab=C13 %then %do; set S04_&tab.; %end; %else %do; set S02_&tab.; %end; If Cd='4' then delete; If Pcd in ('S','C') then delete; %if &tab=C7 %then %do; If INFO_CD in ('','Q') then delete; %end; run; proc sql noprint; create table &tab._mtx_mrg as select t1.*,t2.Flg from &tab._New as t1 left join &tab._EQ as t2 on %If &tab=C13 %then %do; (t1.Bk_1=t2.Bk_P; %end; %else %do; (t1.Bk_1=t2.Bk_P); %end; quit; Data &tab._Req &tab._Rsch; set &tab._mtx_mrg; If flg = 'No' then delete; If flg= 'Yes' then output &tab._Req; else output &tab._Rsch; run; %end; %else %do; Data &tab._&id.; %if &tab=C13 %then %do; set S04_&tab.; %end; %else %do; set S02_&tab.; %end; %if &id=E %then %do; if ACCT_TYPE in ('AN','AU','BO','HM','MO','TN','TR','TU','VN','VU') then delete; %end; if ACCT_TYPE in ('CD','NC','HI','PB') then delete; run; %Mend; %Anlsys(C13,T); %Anlsys(C7,E);
... View more