Date: Wed, 26 Jan 2005 03:52:13 -0500
Reply-To: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim1stat@YAHOO.CO.UK>
Subject: Re: how to seperate characters from words
Try something like (*untested*):
L = INPUT ( SCAN ( Measure, 1, 'x' ), BEST12. );
B = INPUT ( SCAN ( Measure, 2, 'x c' ), BEST12. );
I would not use the variable name Length as it also is a SAS keyword.
Regards - Jim.
Y. (Jim) Groeneveld, MSc., Biostatistician, Vitatron b.v., NL
Jim.Groeneveld_AT_Vitatron.com (replace _AT_ by AT sign)
On Tue, 25 Jan 2005 17:53:08 -0500, Mayukh Dass <mayukh.dass@GMAIL.COM>
>I want to read records like
>and store the first value under variable "length" and second value
>under variable "breadth."
>I used the following code to read the records, but unfortunately for
>the second record (12.3x4.5), it is reading completely (because of
> Input tot_size $50. ;
> only_size = input( scan(tot_size , 1 , " " ) , $5. ) ;
>I also tried the following:
> *Input size_l @"x" size_b ;
>but now it was not reading anything and returning a blank.
>What will be the best way to read this.
>Thanks in advance,