Get started Bring yourself up to speed with our introductory content.

Copying IFS files with QCMDEXC as SQL stored procedure

ISeries PC/Windows connectivity expert Shahar Mor discusses how to copy IFS files to AS/400 with the QCMDEXC command.

I know you can copy IFS files into AS/400 using the CPYFRMPCD and CPYFRMIMPF commands. How can I copy and IFS the file into AS/400 using SQL400?
The shortest solution to your request will be to issue QCMDEXC as stored procedure from SQL (there are alternatives, but they're much more complicated).

The following is an example on how to issue QCMDEXC as stored procedure (basically you can issue commands from SQL):

Call qcmdexc parm('CPYFRMIMPF FROMSTMF(x.txt)


Dig Deeper on iSeries SQL commands and statements