Adopting and Elevating IBM i Authority using *OWNER 

 July 21, 2011

By  NickLitten

Adopting authority on IBM i, iSeries and AS400 can be a very dangerous thing, but if its implemented properly its really quite cool. #discuss šŸ˜‰

Adopting Authority on IBM i

Question: Is there an easy way of finding all programs in all user libraries that use adopted authority? The DSPPGM command doesn’t allow for *ALL and worse, doesn’t output to a file.

Answer 1. Yes and no. The DSPPGMADP can show programs that adopt a specific user profile, as in compiled *OWNER and can put it to a file. Otherwise, its into the APIs for you. Check on QCLRPGMI, retreive program information. The PGMI0100 format has the information that you are looking for. Of course, it isn’t a file, but because it uses a receiver variable, you could code this in a CL program.

Answer 2. You can’t do it by library, but you can do it by user profile. The PRTADPOBJ command allows you to single out a particular user, or specify *ALL users. Unfortunately, the PRTADPOBJ *ALL option prints all of the IBM user profiles as well as the all of your users.

But with a little CL like the one below, you can do the PRTADPOBJ on only the user profiles that you care about. You just have to create the file called USRPRFS in advance and populate it with the names of the profiles that you want to run the report on….

  ReadLoop:  RCVF
   GOTO ReadLoop


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Get In Touch

Iā€™m always looking for awesome input, feedback and critique!


Snug CBD

 20% Discount

I have partnered with SNUG CBD givING you Organic CBD
20% discount code "NL20"