LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 1998, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 15 Apr 1998 19:47:24 GMT
Reply-To:     Jay Weedon <jweedon@EARTHLINK.NET>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Jay Weedon <jweedon@EARTHLINK.NET>
Organization: http://extra.newsguy.com
Subject:      Re: help read a record and then output ...
Content-Type: text/plain; charset=us-ascii

On Wed, 15 Apr 1998 15:19:12 -0400, Tim Pi <timpi@FMRCO.COM> wrote:

>Hi SAS users, > > > I have a file in the following format : > ^xxxx^jljlsas^n134vzcsdr^ccc^re3nh4^ ...............^ > > The ^ is the delimiter. I want to convert it into multiple records > like > xxxx > jljlsas > n134vzcsdr >.... > > However the number of ^ is different everytime I get the file. > Any idea?

data whatever; input string $70.; do i=1 to length(string)-length(compress(string,"^"))-1; str=scan(string,i,"^"); output; end; drop i string; cards; ^xxxx^jljlsas^n134vzcsdr^ccc^re3nh4^ run;

Jay Weedon.


Back to: Top of message | Previous page | Main SAS-L page