I say roll your own. Scott Klement's site has lots of info on reading and
writing stream files. Use those examples and write your own parsing
program. You will get exactly what you want and have much more control
over the process.
My $.02,
Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi
Young i Professionals
http://www.youngiprofessionals.com
Mike Cunningham <mike.cunningham@xxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
07/20/2009 11:11 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
"'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
cc
Subject
Using a csv file with embedded CR/LF
I have to load a csv file I am getting from a 3rd party into an iSeries
database. The csv file files are correctly comma separated and
double-quoted but in one large text string there can be embedded carriage
return/line feeds and the same is used to end the record. The large text
string is within double quotes but CPYFRMSTMF still sees the CR/LF within
the double quotes and takes that as the end of record which results in one
record in the csv file becoming multiple records in the file that is used
in the TOMBR parameter in the CPYFRMSTMF. None of the options for
ENDLINFMT appear to work. Is there some trick to getting CPYFRMSTMF to do
what I need? I do need the embedded CR/LF characters included in the
database field so the text appears correctly when it is displayed on a web
page. Will I need to read the csv file and do my own parsing of the data
to split out each field as needed?
As an Amazon Associate we earn from qualifying purchases.