Published on System iNetwork (http://systeminetwork.com)
Checkup on your Library and Object Authorities
By Jacob.Browne
Created Nov 2 2009 - 23:19

By:
Dan Riehl [1]

In order to stay on top of your library authorities, you need to check them once in a while. You may have tried to do this with interactive commands like WRKOBJ and slog your way down each list item to view the authorities, one library at a time. But, there is a nice IBM supplied command to get a listing of all your library authorities. This is the PRTPVTAUT(Print Private Authorities) command.

The following command will print a list of all public and private authorities for all libraries on your system.

PRTPVTAUT OBJTYPE(*LIB)

Here is a snippet of the printed report.


                        Primary     Auth                              
Object      Owner       Group       List        User        Authority 
#COBLIB     QSYS        *NONE       *NONE       *PUBLIC     *USE      
                                                QSYS        *ALL      
#DRTEST     ZGETTY      *NONE       *NONE       *PUBLIC     *CHANGE   
                                                KQRATE      *ALL      
#LIBRARY    QSYS        *NONE       *NONE       *PUBLIC     *CHANGE   
                                                QSYS        *ALL      
#RPGLIB     QSYS        *NONE       *NONE       *PUBLIC     *USE      
                                                QSYS        *ALL      
AHRFVES     PPDSESID    *NONE       *NONE       *PUBLIC     *CHANGE   
                                                KQRATE      *ALL      
                                                RQPPRTRE    *ALL 

Review the report to check up on your library authorities. Remember that *PUBLIC authority is the authority that is in effect for all users that are not specifically listed on the report (by user or by group profile).

Checking up on Objects

When you need to check on the authorities of the objects in a library, you can use the same command, only this time specify the library name and the object types you want to check. Here is the command to list the authorities on all files in the library PAYLIB.

PRTPVTAUT OBJTYPE(*FILE) LIB(PAYLIB)

And here is a snippet from the resulting report.


5722SS1 V5R2M0  020719                                                
 Library  . . . . . . . . . . . :   PAYLIB                              
   *PUBLIC authority  . . . . . :     *CHANGE                         
 Object type  . . . . . . . . . :   *FILE                             
 ASP device . . . . . . . . . . :   *SYSBAS   
                        
                         Primary     Auth                             
 Object      Owner       Group       List        User        Authority
 AAAOBJ      ALXRT       *NONE       *NONE       ALXRT       *ALL     
                                                 *PUBLIC     *CHANGE  
 AAAOBJTXT   NIXKD       *NONE       *NONE       NIXKD       *ALL     
                                                 *PUBLIC     *CHANGE  
 AANTASAF    ALXCT       *NONE       *NONE       ALXCT       *ALL     
                                                 *PUBLIC     *EXCLUDE 

© 2010 Penton Media, Inc.

Source URL: http://systeminetwork.com/article/checkup-your-library-and-object-authorities

Links:
[1] http://systeminetwork.com/author/dan-riehl