Tank yiu verry much, i have managed to aplly your macro to my dataset, but im still having some problems: 1 one is that when A have more then 1 observation (Ex: A=ciprofloxcin atorvastatin) even if F=DE (F=country, DE=Germany), i still get results from outside DE (ex IT, FR, countries were the second product "atorvastatine" is present). the code is: data result; set l2b1; %check_for(varF=DE, varA=ciprofloxacin atorvastatin); run; proc print data=work.result; run; 2. i would like to be abble to search for a part of the word not exactly the word Ex; %ator not atorvastatin, so to get any obs that start with ator. 3. I dident understand the comment /* A contains... */ was that put there to explain that findw(upcase(A) , "%scan(&varA,&i)") or /* index(upcase(A) , "%scan(&varA,&i)") */ was the cointain function i was looking for. Thank you.
... View more