For better understanding ,kindly provide the desired o/p also.But this might help you. data test; input customer & $200.; cards; Cho0012 (Industrial filling station T/A Caltex mogoboshane) cho0013 (Choppies complex supermarket) SPA0107 (K.A.W ENTERPRISES (PTY) LTD T/A SPAR MOGODITSHANE) ; run; data test1(drop=a b); length a $200. c $200.; set test; a=compress(scan(customer,2, '('),')'); b=compress(scan(customer,3,'('),')'); c=catx('',a,b); run;
... View more