Is there a way to copy an iSeries data base file to a CSV file with column headings in row 1 of the CSV file or does this have to be built one line at a time with an RPGLE program. CPYTOIMPF only transfers the data but does not include column headings. I would like to use the text or column headings from the DB file as the column heading in the CSV file, if possible. I want to store it on the IFS or a DB2 library, if necessary
Announcement
Collapse
No announcement yet.
DB file to CSV, with column headings
Collapse
X
-
CPYFRMIMPF has an option to include the column names, aka field names. But not the "column headings" -- this is the first time I've heard someone ask for that. Are you trying to use this as a replacement for creating a report? You may have to write that yourself.
-
Originally posted by Scott Klement View PostCPYFRMIMPF has an option to include the column names, aka field names. But not the "column headings" -- this is the first time I've heard someone ask for that. Are you trying to use this as a replacement for creating a report? You may have to write that yourself.
Comment
-
If the headings are always the same, a quick way would be to create a STMF template with the headings. When you want to create your CSV, copy the template somewhere, then use CPYTOIMPF to copy the data to the STMF with the *ADD records option . You could of course create a program to generate the headings which would be more versatile.
Comment
Comment