Working with libraries
You can specify the authority for libraries and new objects created in the libraries.
Two parameters on the Create Library (CRTLIB) command affect authority:
- The public authority for the library
- The authorization list that secures the library.
The AUT parameter applies to the library itself, not to the objects in the library. If you specify an authorization list name, the public authority for the library is set to *AUTL.
If you do not specify AUT when you create a library, *LIBCRTAUT is the default. The system uses the CRTAUT value from the QSYS library, which is shipped as *SYSVAL.
Create Authority (CRTAUT): The CRTAUT parameter determines the default authority for any new objects that are created in the library. CRTAUT can be set to one of the system-defined authorities (*ALL, *CHANGE, *USE, or *EXCLUDE), to *SYSVAL (the QCRTAUT system value), or to the name of an authorization list.
CRTLIB TESTLIB AUT(LIBLST) CRTAUT(OBJLST)
the
authority for the library looks like this:
Display Object Authority
Object . . . . . . : TESTLIB Owner . . . . . . . : PGMR1
Library. . . . . : QSYS Primary group . . . : *NONE
Object type. . . . : *LIB ASP device . . . . : *SYSBAS
Object secured by authorization list. . . . . . . . . . . : LIBLST
Object
User Group Authority
*PUBLIC *AUTL
PGMR1 *ALL
- Because an authorization list was specified for the AUT parameter, public authority is set to *AUTL.
- The user entering the CRTLIB command owns the library, unless the user's profile specifies OWNER(*GRPPRF). The owner is automatically given *ALL authority.
- The CRTAUT value is not shown on the object authority displays. Use the Display Library Description (DSPLIBD) command to see the CRTAUT value for a library.
Display Library Description
Library . . . . . . . . . . . . . . . . . : TESTLIB
Type . . . . . . . . . . . . . . . . . . . : PROD
ASP number . . . . . . . . . . . . . . . . : 1
ASP device . . . . . . . . . . . . . . . . : *SYSBAS
Create authority . . . . . . . . . . . . . : OBJLST
Create object auditing . . . . . . . . . . : *SYSVAL
Text description . . . . . . . . . . . . . : Customer Rec