|Date: ||Wed, 11 Apr 2007 20:34:47 -0700|
|Reply-To: ||David L Cassell <davidlcassell@MSN.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||David L Cassell <davidlcassell@MSN.COM>|
|Subject: ||Re: How can I use scan and substr function|
|Content-Type: ||text/plain; format=flowed|
>If I have a variable called "REASON". Because the value for this
>variable are too long, so I need to divided into two variables.
>Reason1 and Reason2. I use reason1 = substr(reason, 1, 100) and
>reason2 = substr(reaso, 101, 200).
>I found out there is one problem, there are some values being
>truncated. I think I need to use SCAN. But there are several comma and
>space in between the values, How can I do this?
Is your only criterion that the split be between words and not in the
middle of a word?
Or do you have more meaningful criteria that should be taken into account?
How long are the strings anyway? Is cutting this into 100 plus 'something
else' going to give you really uneven strings?
And what are you going to do with these variables afterward that makes
you want to split them?
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Mortgage rates near historic lows. Refinance $200,000 loan for as low as