To create a list of local IFS-files into a physical file, follow these steps:
1. Create the file to recieve the filenames:
<pre>CRTPF mylib/mydirlist RCDLEN(12) LVLCHK(*NO)</pre>
2. Make the IFS-directory your current directory:
3. Now use Qshell’s ls command to list the filenames into the physical filefrom step 1.
<pre>qsh ‘ls *.* > /QSYS.lib/mylib.lib/mydirlist.file/mydirlist.mbr'</pre>
Wrap all the above coding into a CL-pgm, and you’ll have your list available as a physical file. Now write a pgm that ‘writes’ all needed ftp-steps into a source-file and run ftp using this. You may Google ‘ftp batch’ to see how, or put a new question.