Connect to AS/400 from a PC and run User Profiles Initial Program

pts.
Tags:
AS/400
DataCenter
i5
IBM iSeries
OS/400
Programming Languages
I'd like to be able to have a user connect via FTP, ect. from a PC to our AS/400, login, and have the user profiles inital program run immediately. We've tried several options, but the initial program doesn't run unless a user signs on to a Session. This is not an option. Can you help? Thanks

Answer Wiki

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

Hi

There isn’t a way that you can do this “easily” – at least none, that I’m aware of. There is, however, a method that you could use to help you achieve some of it.

First, you need to write a program that either receives the user ID as a parameter or picks up the current user ID for the job. This program then calls the QSYRUSRI (Retrieve User Information API) using the USRI0300 record format. This format contains the initial program and library to be called. Once you have retrieved the information you can place a call to the appropriate program.

Note, you will have to compile the program so that it adopts owner authority and have the program owned by a user ID that is authorised to retrieve user profile information.

To run the program for FTP, ODBC, etc, connections you would have to link it to an appropriate exit point (use the WRKREGINF (Work with Registration Information). Search the IBM Information Centre or any of the iSeries sites for information about exit points.

Hope that helps a little

All the best

Jonathan

=======================================================

Since a user profile ‘Initial program’ only makes sense in an interactive session, there is no reason to run it except when a user signs on to an interactive session.

It can’t be used to set an environment for an attachment to a server since there is no guarantee that two requests from a user will run in the same server job. Further, different types of requests, e.g., one through FTP and one through remote command, are guaranteed to run in different server jobs.

The question doesn’t make sense in terms of the operating system environment. Some more explanation of what is expected to happen is needed.

Technically, a full set of exit programs across all servers could conceivably get something like it done, but it’d be a large undertaking.

Tom

Discuss This Question: 1  Reply

 
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
  • Teandy
    My question would be; what are you trying to accomplish? Are you wanting to set the *LIBL or is there something else you are looking to do?
    5,860 pointsBadges:
    report

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