How do two or more if statements work within a By statement. I was looking at the macro suppress in this link: https://blogs.sas.com/content/sgf/2016/04/13/automatic-data-suppression-in-sas-reports/ (and also below) and I found that once the code in blue ran, the macro ran the code in green. It almost seemed like a loop. %macro suppress(dsname=,supclass=);
proc sort data=&dsname;
by &supclass count;
run;
%let sup_flag = 0;
data &dsname (drop=_supnum_);
set &dsname;
by &supclass count;
if first.&supclass then _supnum_ = 0;
if (1 le count le &sup_max) or (_supnum_ eq 1 and count ne .S) then
do;
count = .S;
call symput('sup_flag','1');
end;
if (count eq .S) then _supnum_ + 1;
run;
%mend suppress;
... View more