| Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Change Library (CHGLIB) command can change the type attribute, the text description, the default create authority value, or the default object auditing value of a library.
If the library being changed is currently journaled, entries are deposited to the journal recording the change.
Use the Display Library Description (DSPLIBD) command to display journal information for the library. Refer to the Start Journal Library (STRJRNLIB) command for more information about journaling a library.
Note: For additional information regarding journaling, see the Journal management topic collection in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter/.
Restrictions:
Note: If you do not specify at least one of the Library type (TYPE), Text 'description' (TEXT), Create authority (CRTAUT), or Create object auditing (CRTOBJAUD) parameters, completion message CPC2105 is sent to indicate that the library was not changed.
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| LIB | Library | Name, *CURLIB | Required, Key, Positional 1 |
| TYPE | Library type | *SAME, *PROD, *TEST | Optional, Positional 2 |
| TEXT | Text 'description' | Character value, *SAME, *BLANK | Optional |
| CRTAUT | Create authority | Name, *SAME, *SYSVAL, *CHANGE, *ALL, *USE, *EXCLUDE | Optional |
| CRTOBJAUD | Create object auditing | *SAME, *SYSVAL, *NONE, *USRPRF, *CHANGE, *ALL | Optional |
| Top |
Specifies the library to be changed.
This is a required parameter.
| Top |
Specifies the new library type.
| Top |
Specifies the text that briefly describes the object.
| Top |
Specifies the default public authority for an object created into this library. This is the authority given to a user who does not have specific authority for the object, who is not on an authorization list specified for the object, and whose user groups have no specific authority for the object.
When the user creates an object into this library, the Authority (AUT) parameter on the create command for the object determines the public authority for the object. If the AUT value on the create command for the object is *LIBCRTAUT, the public authority for the object is set to the CRTAUT value for the library.
| Top |
Specifies the auditing value for objects created in this library.
| Top |
CHGLIB LIB(LIB1) TYPE(*TEST) TEXT('NEW TEXT FOR LIB1')
This command changes the TYPE attribute of the library named LIB1 to *TEST and changes the text description to the value specified by the TEXT parameter.
| Top |
*ESCAPE Messages
| Top |