Ad

ISeries Export To CSV

- 1 answer

Is there an iSeries command to export the data in a table to CSV format?

I know about the Windows utilities, but since this needs to be run automatically I need to run this from a CL program.

Ad

Answer

You can use CPYTOIMPF and specify the TOSTMF option to place a CSV file on the IFS. Example: CPYTOIMPF FROMFILE(DBFILE) TOSTMF('/outputfile.csv') STMFCODPAG(*PCASCII) RCDDLM(*CRLF)

Ad
source: stackoverflow.com
Ad