You can research FTP errors by obtaining a spooled file of the FTP server job log.
A copy of the FTP server job log can be required to obtain additional information about errors that occur on the FTP server. The FTP server automatically writes a server job log to a spooled file when it ends with an error.
A server job log can be written to a spooled file without ending the server by issuing the following subcommand from an FTP client:
QUOTE RCMD DSPJOBLOG
To obtain a copy of error messages written to the server job log, this subcommand must be issued after the error has occurred. You can then inspect the job log using the WRKSPLF command.
This technique is recommended in those cases where the reply message returned to the client from the server only provides minimal information about an error occurring on the server machine. For example, this method is useful for obtaining details about I/O errors that occur on the server machine.
If the error prevents the FTP server job log from being obtained by the method described here, enter the following command to force a spooled job log to be created for each FTP session:
CHGJOBD JOBD(QUSRSYS/QTMFTPS) LOG(4 00 *SECLVL)
Then recreate the scenario which causes the error. To restore the original job log behavior after obtaining the required data, enter the following command:
CHGJOBD JOBD(QUSRSYS/QTMFTPS) LOG(4 00 *NOLOG)
To have a spooled job log produced at the end of each FTP session and each time an FTP server ends (with or without an error), use the Change Job Description (CHGJOBD) command as follows:
CHGJOBD JOBD(QUSRSYS/QTMFTPS) LOG(4 00 *SECLVL)
To get a spooled job log only when a server ends, use the CHGJOBD command as follows:
CHGJOBD JOBD(QUSRSYS/QTMFTPS) LOG(4 00 *NOLIST)
The FTP server jobs are started when the STRTCP command is run and the FTP AUTOSTART parameter is set to *YES, or when the STRTCPSVR command is run with a SERVER parameter of *FTP or *ALL. These jobs run in the QSYSWRK subsystem and their purpose is to monitor for incoming FTP users. The format for the names of these jobs is QTFTPnnnnn. The nnnnn is the job number of the FTP server job submitting to this server.
To work with FTP server jobs, enter the following CL command:
WRKACTJOB JOB(QTFTP*)