Hi , Both the solutions work fine for me in most of the rows but i also found a case which is as follows data have; length VAR1 $50 var2 $50; input VAR1 $ VAR2 $; infile datalines dlm='|'; datalines; 1.LMK 2.ABCNM 3.XYZ|ABCNM, XYZ, NM 1.ABC|ABCNM, XYZ, NM 1.XYZ|ABCNM, XYZ, NM ; run; here in my first now my resultant should be only "ABCNM, XYZ" but i get "ABCNM,XYZ,NM" which shouldnt be the case as im looking for exact matches Also can i apply formats to these drugnames at the same time? Please help! Thanks
... View more