Hi,
Asking how to do a macro within a macro! %POP is m y first macro, and %STAT is my macro within....I am asking how I need to se the bold part of this sample code (%STAT) so it executes within %POP. Any help is appreciated!!
%macro pop (flg, trt, num);
Data ADSL;
set ADAM.ADSL (where=(&flg='Y'));
if &trt =: "ADI" then do;
txgrp = "A"; output;
txgrp = "T"; output;
end;
if &trt =: "Placebo" then do;
txgrp = "B"; output;
txgrp = "T"; output;
proc sort; by usubjid;
run;
.........
%macro stat (var);
proc means data= adsl noprint;
by txgrp;
var &var;
output out= stat_&var n=n mean=mean std=std median=median min=min max=max;
run;%mend stat;
%stat (heightbl); %stat (weightbl); %stat (bsabl);
.......
data stats#
length _1 $50 text $200;
set first (in=a)
stat_heightbl (in=b)
stat_weightbl (in=c)
stat_bsabl (in=d);
run;
%mend pop;
%pop(SAFFL, TRT01A, 1);
%pop(ITTFL, TRT01P, 2);