The grp_lst probably should have been done all in macro language but I couldn't figure that out so I created a column that I later put into a macro list using proc sql into; So, now that I have this I am trying to work with it . If I can edit the column using tranwrd then I will eventually create a macro list from it. here is a brief sample. Basicall, grp_lst is the same for each drug in the database when I loop through drugs I use a new list for each drug. This sample is for just drug1 . data drug1_sample ; length grp_lst $32. ; input drug $ age $ gender $ type1 $ type2 $ grp_lst $ ; infile datalines4 delimiter=',' ; datalines; drug1,<50,F,A,B,age gender type1 type2 drug1,<50,F,B,B,age gender type1 type2 drug1,<50,F,C,B,age gender type1 type2 drug1,<50,M,A,B,age gender type1 type2 drug1,<50,M,B,B,age gender type1 type2 drug1,<50,M,C,B,age gender type1 type2 ; run; proc print ;run;
... View more