BookmarkSubscribeRSS Feed
T_me
Calcite | Level 5

Please help, I want to scan the words that are within the brackets.

Customer

Customer: Cho0012 (Industrial filling station T/A Caltex mogoboshane)

Customer: cho0013 (Choppies complex supermarket)

Customer: SPA0107 (K.A.W ENTERPRISES (PTY) LTD T/A SPAR MOGODITSHANE)

 

Thanks

T_me

2 REPLIES 2
PaigeMiller
Diamond | Level 26

What is the desired output?

--
Paige Miller
asuman
Obsidian | Level 7
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;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 426 views
  • 0 likes
  • 3 in conversation