Importing/exporting data with carriage returns (I Think)
Nancy Palmquist
nancy.palmquist at vss3.com
Mon Aug 28 13:14:20 PDT 2017
This discussion went off the rails into something I think should be stopped.
If you guys want to argue please take it off list. There is totally no
need for this kind of thing here.
No one is obligated to post so if you have something to say that is not
helpful to the question provided, just do not reply.
On the topic at hand, I have run into this issue before.
If this file is provided by someone, see if they have another format
that can be provided. That might solve your issues entirely.
I found that even if you quoted data in the file, filepro would drop the
rest of the record when it saw a linefeed. Then it picks up the next
record starting at the next quoted data. I think this is a bug in
filepro as a quoted bit should not see anything in the quotes as a field
delimiter or a record delimiter.
Filepro will ignore commas in quotes but not cr/lf.
If you know this will happen, it might be possible to program around it
by combining the two records together but you will still lose the data
between the cr/lf and the next field delimiter.
"xxxxxxx","xxxxxxx cr/lf yyyyyyy","zzzzzzz"
So in my example you would lose the yyyyyyy part since it is after the
cr/lf and the next ," would mark the beginning of a new column.
You could also, pull the data in using OPEN and READ. This method does
not look at any delimiters it will just grab bytes. If you can tell
from the data where a record ends and where the cf/lf characters might
be incorrect, you might be able to selectively translate them to spaces
and rewrite the file without the bad cf/lf.
I hope that expands your thinking a bit. See if you can get a different
file type, that might make your life easier to start.
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list