Your right. The requirement was just to read a long line from a CSV file. I was assuming that if he wanted to READ a CSV record he may actually want to PARSE the CSV record and do something with the data. BIG assumption on my part, he may have just needed to re-write the record, send the record to a table or who knows what.
IF he was going to attempt to read AND parse a CSV record, READING the record from a text file was going to be the absolute easiest part of what ever he is working on. Just thought I would give a tip on CSV parsing. Just thinking about parsing a CSV record in ER code (or any language for that matter) makes my brain hurt... actually let me restate that; *CORRECTLY* parsing a CSV record in ER code that *CORRECTLY* implements the
CSV Commonly Accepted "Standard" in ER code seems like a very daunting task (BTW, even TCs don't allways correctly parse a properly formed CSV file). When I was faced with this task I went and looked for an open source solution that incorporates the CSV standards and when I found one, I simply put a JDE wrapper on it. In other words, I let someone else do all the heavy lifting for me. Since I did that I have reused that CSV lib BSFN multiple times for writing and reading/parsing CSV files. It takes less than an hour to implement reading and parsing a new CSV file layout.
Attached has the following:
PRJ_bgo.59.CSV_JDE_LIB_60_99.par
The BSFN lib of which I talked about.
PRJ_bgo.59.Example_CSV1_60_99.par
Example that read records from F0101 and exports some selected fields to a CSV file and then turns around and parses select fields out of the newly created CSV file.