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
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.