Swap a user ID in AS/400 jobs

125 pts.
Tags:
AS/400 administration
AS/400 jobs
AS/400 user profiles
How can I swap a user ID on an AS400 job

Answer Wiki

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

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
  • TomLiotta
    You'll want to be familiar with some of the Security-related APIs. The most likely ones you'll start with are the Get Profile Handle (QSYGETPH), Set Profile Handle (QWTSETP) and Release Profile Handle (QSYRLSPH) APIs. Those are all pretty simple to use. I suggest that you write two programs. The first one will get handles and switch to the target profile. The second will switch back to the original profile and release the handles. That lets you call the two on demand, before and after whatever operations you want to do under the alternate profile, and it helps by assigning ownership and authority to both functions. The initial profile will probably need *OWNER assistance in swapping to the target profile, and the target profile might need *OWNER assistance in returning things back to normal. Whatever is needed from the first program by the second program can simply be passed through CALL parms. Most things that need to be done under a swapped profile can be done just with those APIs (and sufficient authority). Stuff that needs more than those can give will seem a lot easier once you see how those can work. You might never need anything beyond your two first programs. Any swaps will be released simply by ending the job. You can generate thousands of handles, but you really should try to make sure each handle is released when you're done with them. Tom
    125,585 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