User Exit Programs FTP

510 pts.
Tags:
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.
ASKED: February 6, 2008  7:27 PM
UPDATED: February 6, 2008  8:59 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

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
<a href=”http://www.brucevining.com/”>http://www.brucevining.com/</a>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following