iSeries adopted authority - How to run programs under Owners profile regardless of the current user

Sometimes there is need for running a job under a higher authority than the user who will be running that program. So how do we achieve something like that without actually giving every user that will be using that program the needed authority. The Use adopted authority(USEADPAUT) feature comes to the rescue. Here is how to make use of this feature ...

  • Compile your program as usual
  • CHGOBJOWN OBJ($1) OBJTYPE(*PGM) NEWOWN($2)
    • $1 = The program name
    • $2 = The user profile that has the needed or higher authority
  • CHGPGM PGM($1) USRPRF(*OWNER) USEADPAUT(*YES)
    • $1 = The program name

After you do all the above steps if a user ABC runs the program $1 it will run under the adopted authority from user profile $2

No comments:

Post a Comment

NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.