Adopting authority on IBM i, iSeries and AS400 can be a very dangerous thing, but if its implemented properly its really quite cool. #discuss 😉
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….PGM Dclf USRPRFS ReadLoop: RCVF MONMSG CPF0864 EXEC( RETURN ) PRTADPOBJ USRPRF( &USRPRF ) GOTO ReadLoop ENDPGM
IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd 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 in the words of the most interesting man in the world: Stay thirsty my friend.
Upload a SAVF using IFS and IBM i Access Client Solutions (no FTP)
IBM i User Profile – Special Authorities
WordPress Jetpack Error “Server unable to connect with my site http 404”
Give AS400 users the ability to change user authority temporarily
An old AS400 Quiz willed with technical questions and plain old fashioned AS/400 brainteasers
How to get IBM i command line during runtime using System Request 3
Trump announces we need to start planning for the Y10K Software Crisis
Adopting Authority – Problems with SQL RPG Programs