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 (October 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 18 Oct 2006 02:45:08 -0400
Reply-To:     Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Subject:      Re: input data not consistent
Comments: To: jjj912@YAHOO.COM

Hi JJJ,

You should firstly question the origin of the inserted newline characters. Is there some regular pattern? Then you could use the same pattern to remove them using a dedicated algorithm.

I have developed a macro RemBugNL, that removes undesired, premature newline characters in (text) fields in ascii data. But it only works correctly if the line lengths of all records are or should be equal (fixed length records). And it replaces the newlines by one space at least, sometimes by two or three spaces.

See http://home.hccnet.nl/jim.groeneveld/software/SASmacro

Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant home.hccnet.nl/jim.groeneveld

On Tue, 17 Oct 2006 13:01:15 -0700, jjj912@yahoo.com <jjj912@YAHOO.COM> wrote:

>My input data is comma delimited and it normally looks like either >N,X,"A",Y,"B" >N,X,"A",Y,"B" > >However, sometimes it looks like >N,X,"A >",Y,"B" >N,X,"A",Y,"B" > >The data for a single observation is on two lines sometimes. How would >I go about telling SAS to look at the next line to see if the current >observation spans two lines and, if so, to read the second line for the >rest of the data?


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