RATE THIS ANSWER
0
Click to Vote:
0
0
Last Answered:
Feb 6 2008 8:59 PM GMT
by Bvining
Just to play it safe, when you add your exit program to QIBM_QTMF_SERVER_REQ also ENDTCPSRV *FTP and STRTPCSVR *FTP to make sure FTP picks up the addition. We'll now know for sure that FTP is aware of your exit program.
When the PC initiates the FTP session your exit program, and assuming you have not used any of the other FTP related exit points, then your program should be called with an application identifier of 1 and a user profile of QTCP. After you Allow this request the PC user would enter their user ID and password. Now if the PC user issues a put/send then your exit program will be called with a user profile matching what they signed on with, an application ID of 1, and an operation ID of 7 as the System i (as a server) is about to Receive a file. If the user does a get, the operation ID would be 6 as the System i is going to send a file.
As for debugging, that is difficult when working as a server. The reason is that the server function is running as a background job. You can see these with WRKACTJOB and finding a job name that starts with QTFTP. If you're on V5R4 you will also see the PC user's user ID in the 'Current User' column. Knowing the server job associated with the PC user, you can now use STRSRVJOB to start service and debug the job. Personally I would just add a few (assuming you're RPG) dsply statements to my program. The messages will show up in QSYSOPR by default.
Client side debugging is easy enough as FTP is running within your current job.
It's beginning to look like you're really after both client and server policing (depending on the interface used by your user -- green screen or PC).
As for appending, if you scroll to after my answer you should see an area for 'Add to Discussion'.
I hope this helps,
Bruce Vining
http://www.brucevining.com/