Date: Thu, 9 Dec 2004 07:35:33 -0800
Reply-To: Dennis Diskin <diskin@SNET.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dennis Diskin <diskin@SNET.NET>
Subject: Re: Q on extracting data from a variable
In-Reply-To: <20041209150639.74684.qmail@web14227.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii
Rahul,
One way is to use the SCAN function:
acct1=scan(acct,1,'-');
acct2=scan(acct,2,'-');
acct3=scan(acct,3,'-');
Of course, if you want the numeric values, you'll need to in INPUT function also.
HTH,
Dennis Diskin
RAHUL CHAHAL <rahulchahal@YAHOO.COM> wrote:
Hi,
Would like to find out how to extract the following values of a variable:
Acct
1 - 1111 - 123456
1 - 121212 - 9876543
1 - 21212 - 909045600
99 - 32435465 - 121
Into 3 variables:
Acct1 Acct2 Acct3
1 1111 123456
1 121212 9876543
1 21212 909045600
99 32435465 121
Thanks for your help.
Rahul
---------------------------------
Do you Yahoo!?
Meet the all-new My Yahoo! – Try it today!
|