Stripping Carriage Return / Line Feed from text file

Mike Schwartz mschw at athenet.net
Wed Jul 30 08:30:22 PDT 2008


Quoting Scott Walker (Tue, 29 Jul 2008 17:27:13 -0400):
>
> I want to use a text file as an alien file.
>
> It's fixed length fields but has a carriage return/line feed between each
record.
>
> Can someone remind me of the easiest way to strip the 0d0a from these
records?

    Rather than bothering to strip the CR/LF off, why don't you just overlay
a "non-filePro file" map over the file?  Add a 2-byte field named "Cr/Lf" as
the last field in your map. Then you can access the file directly through
filePro, using lookups and other filePro processing without having to do any
extraneous filePro processing.

    (Just don't display the Cr/LF on the screens or reports, because it
draws weird characters.)
 
Mike Schwartz

 



More information about the Filepro-list mailing list