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 12:41:58 -0700
Reply-To:     "Berryhill, Timothy" <TWB2@PGE.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Berryhill, Timothy" <TWB2@PGE.COM>
Subject:      Re: help read a record and then output ...
Comments: To: "timpi@FMRCO.COM" <timpi@FMRCO.COM>
Content-Type: text/plain

Perhaps something like: DATA SPLIT; INFILE JOINED 'SOME.DATA.HERE' DLM='^'; VALUE='AS LONG AS THE MAXIMUM VALUE'; DO UNTIL (VALUE EQ ''); INPUT VALUE @; IF VALUE GT '' THEN OUTPUT; END; RUN;

This will not handle embedded blanks. That might require reading the file binary.

Tim Berryhill - Contract Programmer and General Wizard TWB2@PGE.COM or http://www.aartwolf.com/twb.html Frequently at Pacific Gas & Electric Co., San Francisco The correlation coefficient between their views and my postings is slightly less than 0

> ---------- > From: Tim Pi[SMTP:timpi@FMRCO.COM] > Reply To: timpi@FMRCO.COM > Sent: Wednesday, April 15, 1998 12:19 PM > To: SAS-L@UGA.CC.UGA.EDU > Subject: help read a record and then output ... > > 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? > > Thx! > > Tim Pi >


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