Question

  Asked: Feb 6 2008   7:27 PM GMT
  Asked by: Piano


User Exit Programs FTP


User Exit Program FTP

Hi Bruce

I have this program added to the QIBM_QTMF_SERVER_REQ.
I am wondering though ... when I run from green screen, it type FTP 'XXX.XX.XXXX;. From PC, Open XXX XX XXXX. Then User ID XXXXXXXXXX and Password XXXXXXXXXX. From green screen, it has my user profile id. From PC, I have no idea what it has ?? Can I somehow debug from PC to see what's going on? Also, at what point does the exit program get invoked when I run from the PC?

I only seem to be able to debug the program, when I am in green screen.

Thanks

Nick

ps; Don't know how to append a question.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



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/
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register