10-30-2016 06:14 AM - edited 10-30-2016 06:31 AM
rx name 1 clozipine hyrochloride 2 clozipine 3 terazip 3 terazip hydrochloride 4 asipirin
I know this is a simple question but I am trying to find the most efficient way to resolve it. I want to group id who have clozpine and terazip togethe. There are so many rxs that would need to be grouped together, I was thinking about substr but I got an error.
if substr, x, i, 1,7 in (clzpinee, terazip) then do
10-30-2016 10:02 AM
This might be the easiest way to say it:
if name in : ('clozipine ', 'terazip ') then do;
It's up to you whether you want to include the blank at the end of the compound name.