From: SAS_learner on
Hello all,

%Macro Frq(Arm = , Arm_t = ,In = ) ;
Proc Freq Data = Val_adsl_ae1(Where = (&Arm. )) Noprint ;
Table &In. /Binomial (Level= '1' ) ;
Output Out = est2_t1 (keep = XU_BIN XL_BIN) Binomial ;
Run;

Data est2_t1;
Set est2_t1;
Arm_t= "&Arm_t." ;
Run;

Proc Transpose Data = est2_t1 Out = &In._&Arm_t. ;
Id Arm_t;
Run;
%Mend;

%Frq(Arm = %Nrstr(Arm In ('375') ), Arm_t = 375, In =Inc_n );
%Frq(Arm = %Nrstr(Arm In ('500') ), Arm_t = 500, In =Inc_n );
%Frq(Arm = %Nrstr(Arm In ('375','500') ) , Arm_t = 999, In =Inc_n );


%Frq(Arm = %Nrstr(Arm In ('375') ), Arm_t = 375, In =Inc1_n );
%Frq(Arm = %Nrstr(Arm In ('500') ), Arm_t = 500, In =Inc1_n );
%Frq(Arm = %Nrstr(Arm In ('375','500') ) , Arm_t = 999, In =Inc1_n );


I am trying to do something like above and set the output datasets for my
table. In the above way I need to call the Frq macro three times (for each
Arm ) 3* 5 Inc_n ( 1 to 5) .

Is there better way of doing in a better way ?

Thanks For your time and help.

SL