Date: Tue, 30 May 2006 15:16:33 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: A Problem with sas variables
In-Reply-To: <200605301513.k4UAlwYT005693@malibu.cc.uga.edu>
Content-Type: text/plain; format=flowed
Rathindronath ,
Okay simple enough :
BPS = compress( scan( BPS , 1 , ' ' ) , ':,') ;
Toby Dunn
From: Rathindronath <mehedisas@YAHOO.COM>
To: SAS-L@LISTSERV.UGA.EDU, Toby Dunn <tobydunn@HOTMAIL.COM>
CC: Md Alam <mehedisas@YAHOO.COM>
Subject: Re: A Problem with sas variables
Date: Tue, 30 May 2006 11:13:56 -0400
Sorry, It was a bit messy data. I should have send you the complete. Please
find it as follows Variable(BPS)
BPS
-------
Acute Coronary
Article Fibrillant
Other: Coronary
Other: Stroke
Other: Sympton
Other, Agina Post
OTHER
I need to get only the first word Other.
So my dataset will be:
BPS
------
Acute Coronary
Article Fibrillant
Other
Other
Other
Other
Other
How can do that? I meant I need all values of the variable that start with
other or OTHER regardless of the case or if there is any ':' or ',' or any
other character.
Thanks a lot for previous help. But I will need a little more. Thanks again.
|