%macro eye (eye,dat, id); data adae ; set adamdata.adae; if STUDYGR1 ='Y' and AECAT=&eye and TRTEMFL='Y' and AEBODSYS ne '' 1 ; *'Ocular'; where &cond1; run; proc sql ; /*Number of subjects TRTAN */ create table any as select trtan, count(distinct usubjid) as cnt from adae where trtan ne . group by trtan; create table soc as select AEBODSYS,trtan, count(distinct usubjid) as cnt from adae where trtan ne . group by AEBODSYS,trtan; create table pt as select AEDECOD, AEBODSYS, trtan, count(distinct usubjid) as cnt from adae where trtan ne . group by AEDECOD,AEBODSYS,trtan; quit; ------ %mend eye; The where condition(in red color) needs to be modified for each table. Eg: where ethnicity="Hispanic" where ethnicity="Not Hispanic" where sex="Female" where sex="Male" where agegr1n=1 where agegr1n=2 where agegr1n=3 where agegr1n=4 I need to pass all these where conditions in one program.How can i do that?
... View more