I'd like to do the following, but I don't know how to code it: I have 5 character variables (med_1, med_2 ... med_5) and I want to create a new variable, "antibiotic", which will = 1 if ANY of med_1-med_5 contain the name of an antibiotic. I'd like to create a list of possible antibiotic names: ampicillin, amoxicillin, gentamycin, etc. and then tell SAS to check the contents of med_1-med_5 and if ANY are equal to a drug name in my list, then make antibiotic=1, otherwise, antibiotic=0. Thanks in advance for your help!
... View more