Change Library List (CHGLIBL)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Change Library List (CHGLIBL) command changes the user portion of the library list for the current thread with the list of libraries specified by the user. This command does not affect the system portion of the library list, nor does it affect library list for any other thread.

Restrictions: You must have use (*USE) authority for all the specified libraries before the library list is changed. If you are not authorized to one or more of the libraries, the library list is not changed.

Top

Parameters

Keyword Description Choices Notes
LIBL Libraries for current thread Single values: *SAME, *NONE
Other values (up to 250 repetitions): Name
Optional, Positional 1
CURLIB Current library Name, *SAME, *CRTDFT Optional, Positional 2
Top

Libraries for current thread (LIBL)

Specifies the libraries that are placed in the user portion of the library list for the current thread. This parameter can be specified as a single value or as a list of one or more names.

Single values

*SAME
The libraries that are in the user portion of the library list for the current thread are not changed.
*NONE
No libraries are in the user portion of the library list for the current thread.

Other values

name
Specify the names of the libraries to be added to the user portion of the library list for the current thread in the order in which they are to be searched. Up to 250 names can be specified.
Top

Current library (CURLIB)

Specifies the library to replace the current library in the library list for the current thread.

*SAME
The current library in the library list for the current thread is not changed.
*CRTDFT
No library should be in the current entry in the library list for the current thread. If objects are created into the current library, the QGPL library is used as the default current library.
name
Specify the name of the library that replaces the current library entry in the library list for the current thread.
Top

Examples

CHGLIBL   LIBL(ULIB10 ULIB15 QGPL)

This command changes the user portion of the library list for the current thread. The new library list contains libraries ULIB10, ULIB15, and QGPL. They are searched in that order.

Top

Error messages

*ESCAPE Messages

CPF2106
Library list not available.
CPF2110
Library &1 not found.
CPF2113
Cannot allocate library &1.
CPF2176
Library &1 damaged.
CPF2182
Not authorized to library &1.
CPF2184
Library list not replaced.
Top