cozTools-Add MultiLibl Entries (ADDLIBL)

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

The cozTools-Add Multi Libl Entries (ADDLIBL) command allows the user to add 1 or more libraries to the current user-portion of the library list. This is functionally equivalent to the IBM i CL command ADDLIBLE, however ADDLIBL allows the user to add more than one library at a time.

Top

Parameters

Keyword Description Choices Notes
LIB Libraries Values (up to 250 repetitions): Name Required, Positional 1
POSITION Position on library list Single values: *FIRST, *LAST, *START, *END
Other values: Element list
Optional, Positional 2
Element 1: Position *BEFORE, *AFTER, *REPLACE
Element 2: Reference library Name
Top

Libraries (LIB)

Specifies the libraries to be added to the user portion of the library list for the current thread. A maximum of 250 libraries may exist in the user portion of the library list. Up to 250 library names may be added at a time with this command.

This is a required parameter.

You can specify 250 values for this parameter.

name
Specify the name of the libraries to be added to the user portion of the library list for the current thread.
Top

Position on library list (POSITION)

Specifies the position in the user portion of the library list for the current thread where the libraries are inserted. This parameter can be specified as a single value or as a list of two elements.

Single values

*FIRST
The libraries are inserted in front of (before) existing libraries on the user portion of the library list for the current thread.
*LAST
The libraries are added to the end of the user portion of the library list for the current thread.

Element 1: Position

*BEFORE
The libraries specified for the Library (LIB) parameter are inserted into the user portion of the library list for the current thread before (in front of) the library name specified on the Reference Library portion of this parameter.
*AFTER
The libraries specified for the Library (LIB) parameter are added to the user portion of the library list for the current thread after the library name specified on the Reference Library portion of this parameter.
*REPLACE
The libraries specified for the LIB parameter are inserted into the library list for the current thread in the position currently held by the library name specified on the Reference Library (element 2) and the Reference Library is removed from the list. If the Reference Library does not exist on the current user-portion of the library list, the command will fail.

Element 2: Reference library

name
Specify the name of the library to be the Reference Library when *AFTER, *BEFORE, or *REPLACE is specified for the list position (element 1). This library must exist in the user portion of the library list for the current thread.
Top

Examples for ADDLIBL

Example 1: Simple Command Example

ADDLIBL  LIB(COZOOLS QGPL QTEMP) POSITION(*REPLACE PGMRTOOL)

This command replaces the library named PGMRTOOL on the user portion of the library list with 3 libraries: COZTOOLS, QGPL, and QTEMP. The PGMRTOOL library is removed from the library list.

Example 2: More Complex Command Example

ADDLIBL  LIB(COZOOLS) POSITION(*LAST)

This command adds the COZZI TOOLS library named COZTOOLS to the end of the user portion of the library list.

Top

Error messages for ADDLIBL

*ESCAPE Messages

CPF9801
Object &2 in library &3 not found.
CPF9802
Not authorized to object &2 in &3.
CPF9803
Cannot allocate object &2 in library &3.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9810
Library &1 not found.
CPF9811
Program &1 in library &2 not found.
CPF9812
File &1 in library &2 not found.
CPF9820
Not authorized to use library &1.
CPF9830
Cannot assign library &1.
CPF9899
Error occurred during processing of command.
Top