Imports with Linefeeds in the data
Boaz Bezborodko
boaz at mirrotek.com
Mon Dec 12 07:55:55 PST 2011
:
> Date: Sun, 11 Dec 2011 13:09:17 -0600 From: "Mike Schwartz"
> <mschw at athenet.net> Subject: RE: Imports with Linefeeds in the data
> To: "'Filepro-List at Lists. Celestial. Com'"
> <filepro-list at lists.celestial.com> Message-ID:
> <0c0d01ccb838$61d0e060$2572a120$@athenet.net> Content-Type:
> text/plain; charset="us-ascii"
>> I have a customer that will be sending me orders in a file that has
> linefeed
>> characters in a particular field in some records. The records are
> separated by
>> a CR-LF and the LFs are by themselves in one of the fields in some of the
>> records. Currently it treats the data separated by the LFs as separate
> records
>> which messes up the importing.
>>
>> First, how do I separate the records using IMPORT? Second, can I
>> import these so that the linefeeds are included in a field in Filepro?
>>
>> Thanks in advance,
>> Boaz
> I'm going to presume that you're running a Unix or Linux version of
> filePro, although you don't state that. In this case, it's important to
> know which version of filePro you're running and also which operating
> system. I don't want to suggest shell scripts and such that might not run
> on your particular operating system.
>
> Here are a few quick thoughts:
>
> You might want to consider using filePro's "open" command. "Open"
> gives you much better control of incoming files. Then use xlate or some
> other code to remove the unwanted statements.
>
> You can pass through your "import" statement more than once, reading
> the import file multiple times and concatenating the strings together until
> you encounter a "cr" character. Again, use xlate on the strings to remove
> the unwanted LF characters. Then process the whole string as one record.
>
> As I mentioned, there are SED and AWK shell scripts that have been
> posted on this list that probably will remove the stray LF's, but we need to
> know which operating system you're running.
>
> In addition to letting us know which operating system you're using, it
> would help if you could cut and paste the specific import line you're trying
> to use.
>
> Hope that helps. If not, please send us more info.
>
> Mike Schwartz
I'm running Filepro Windows 5.6.10D9
More information about the Filepro-list
mailing list