How does one export a.csv file in the iSeries 400?
Use the CPYTOIMPF command. This command gives you various other export options, such as specifying your choice of string, field and record delimiters, the ability to put the exported file in the Integrated file system, etc. It may be interesting for you to prompt the command and see what else you may want to do with it. As an FYI, there is also a CPYFRMIMPF command, which will take a csv file and import it to the iSeries. Following are a couple examples of the CPYTOIMPF command.
Comma delimited to QSYS file system
CPYTOIMPF FROMFILE(MYLIB/MYFILE) TOFILE(QTEMP/EXPORT) FLDDLM(',')
Comma delimited to Integrated file system
CPYTOIMPF FROMFILE(MYLIB/MYFILE) TOSTMF('/mydir/export.csv') RCDDLM(*LF) FLDDLM(',')
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Dig Deeper on RPG iSeries programming
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.