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
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.
Regards - Jim.
Jim Groeneveld, Netherlands
Statistician, SAS consultant
On Tue, 17 Oct 2006 13:01:15 -0700, firstname.lastname@example.org <jjj912@YAHOO.COM> wrote:
>My input data is comma delimited and it normally looks like either
>However, sometimes it looks like
>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?