|
Adam <worldtraveller999@GMAIL.COM> wrote:
> I have a name and address file in which the address field contains
> embeded carriage returns using the infile statement results in a
> dataset with multiple data records
>
> addr
> addr
> addr
>
> I want to replace the carriage return with a space to generate one
> address field per name can anyone suggest a solution.
The following rambling assumes that you're working on a Win32 box.
If not, then you need to correct me.
Are these 'carriage returns' or 'hard returns'? I mean, when you
look at the file in a hex editor, are these a single character, or
the two-character hard return '0D0A'x that MS-DOS uses to end lines
of text files? If they are only the '0D'x or '0A'x character, then
it will be a lot easier to yank them out programatically. If
they're the standard two-character hard return, then you'll have to
come up with a system by which a computer can tell when you're at
the end of a line and when you're in the middle of an address. That
depends on the structure of your data, which I can't quite make out
from way over here. :-)
Can you write back to SAS-L (not to me personally) and give us some
guidance? Please tell us:
what OS you're using;
what software created the file and why it can't be fixed before coming
to you;
how your data look;
what the hex codes for your breaks are;
and how you can tell when the newline is supposed to be there.
Awaiting your reply,
David
--
David Cassell, CSC
Cassell.David@epa.gov
Senior computing specialist
mathematical statistician
|