Add Binding Directory Entry (ADDBNDDIRE)

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

The Add Binding Directory Entry (ADDBNDDIRE) command adds an entry to a binding directory.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
BNDDIR Binding directory Qualified object name Required, Positional 1
Qualifier 1: Binding directory Name
Qualifier 2: Library Name, *LIBL, *CURLIB, *USRLIBL
OBJ Object specifications Values (up to 50 repetitions): Element list Required, Positional 2
Element 1: Object Qualified object name
Qualifier 1: Object Generic name, name, *ALL
Qualifier 2: Library Name, *LIBL
Element 2: Object type *SRVPGM, *MODULE
POSITION Position specifications Single values: *LAST, *FIRST
Other values: Element list
Optional, Positional 3
Element 1: Object position *AFTER, *BEFORE, *REPLACE
Element 2: Object Qualified object name
Qualifier 1: Object Name
Qualifier 2: Library Name, *LIBL
Element 3: Object type *SRVPGM, *MODULE
Top

Binding directory (BNDDIR)

Specifies the binding directory to which an entry is added.

This is a required parameter.

Qualifier 1: Binding directory

name
Specify the name of the binding directory to be updated.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
*USRLIBL
Only the libraries in the user portion of the job's library list are searched.
name
Specify the name of the library to be searched.
Top

Object specifications (OBJ)

Specifies one or more object names to be added to the binding directory.

This is a required parameter.

You can specify 50 values for this parameter.

Element 1: Object

Qualifier 1: Object

*ALL
All objects of the specified object type residing in the specified library are to be added.
generic-name
Specify the generic name of the object. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic name specifies all objects with names that begin with the generic prefix for which the user has authority. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete object name. If the complete object name is specified, and multiple libraries are searched, multiple objects can be added only if *ALL or *ALLUSR library values can be specified for the name.
name
Specify the name of the object to be added to the binding directory.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
name
Specify the name of the library to be searched.

Element 2: Object type

*SRVPGM
The object to be added is a service program.
*MODULE
The object to be added is a module.
Top

Position specifications (POSITION)

Specifies the position in the binding directory where the list of objects is added.

Single values

*LAST
The list of objects is to be added to the end of the binding directory entries.
*FIRST
The list of objects is to be inserted prior to the first binding directory entry.

Element 1: Object position

*AFTER
The list of objects is added to the binding directory after the binding directory entry specified for this parameter. The entry specified must currently exist in the binding directory.
*BEFORE
The list of objects is added to the binding directory before the binding directory entry specified for this parameter. The entry specified must currently exist in the binding directory.
*REPLACE
The object specified on the OBJ parameter replaces the binding directory entry specified for this parameter. The entry specified must currently exist in the binding directory. Only one entry can be specified on the OBJ parameter.

Element 2: Object

Qualifier 1: Object

name
Specify the object name of an existing binding directory entry.

Qualifier 2: Library

*LIBL
The existing binding directory entry has a library qualifier of *LIBL.
name
Specify the name of the library qualifier for the existing entry.

Element 3: Object type

*SRVPGM
The directory entry is a service program.
*MODULE
The directory entry is a module.
Top

Examples

Example 1: Add Entry to End of List

ADDBNDDIRE   BNDDIR(TESTBNDDIR)  OBJ((TESTOBJ))
             POSITION(*LAST)

This command adds a binding directory entry for service program TESTOBJ in library *LIBL to the end of the list of binding directory entries found in the binding directory TESTBNDDIR.

Example 2: Add Entry to Beginning of List

ADDBNDDIRE   BNDDIR(TESTBNDDIR)
             OBJ((TESTLIB/TESTOBJ *MODULE))  POSITION(*FIRST)

This command adds a binding directory entry for module TESTOBJ in library TESLIB to the beginning of the binding directory entries found in the binding directory TESTBNDDIR.

Example 3: Add Multiple Entries

ADDBNDDIRE   BNDDIR(TESTBNDDIR)
             OBJ((TESTLIB/TESTOBJ *MODULE) (TESTOBJ2))
             POSITION(*FIRST)

This command adds a binding directory entry for module TESTOBJ in library TESTLIB followed by an entry for service program TESTOBJ2 in the library list to the beginning of the binding directory entries found in the binding directory TESTBNDDIR.

Example 4: Add Entries Before an Existing Entry

ADDBNDDIRE   BNDDIR(TESTBNDDIR)
             OBJ((TESTLIB/TESTOBJ *MODULE) (TESTOBJ2))
             POSITION(*BEFORE  *LIBL/TESTMOD *MODULE)

This command adds a binding directory entry for module TESTOBJ in library TESTLIB, followed by an entry for service program TESTOBJ2 in library *LIBL prior to the binding directory entry for module TESTMOD in library *LIBL found in the binding directory TESTBNDDIR.

The binding directory entry for module TESTMOD in library *LIBL must be found in the binding directory TESTBNDDIR for this operation to be successful.

Top

Error messages

*ESCAPE Messages

CPF5D01
Binding directory &1 in library &2 is not usable.
CPF5D09
Object &2/&1 type &3 was not found in binding directory &4 in library &5.
CPF980F
Binding directory &1 in library &2 not found.
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.
CPF9820
Not authorized to use library &1.
CPF9830
Cannot assign library &1.
Top