Command reference / prog

ADDBNDDIRE

Add Binding Directory Entry

The Add Binding Directory Entry (ADDBNDDIRE) command adds an entry to a binding directory. You can control the activation of each service program: whether the referenced service program is activated at the same time as the program or service program being created from the binding directory, or is deferred until a procedure exported from the referenced service program is called. Deferring activation may improve your application's performance.

Allowed environments: *ALL. Positional parameters: 3.

Restrictions

Parameters

BNDDIR Binding directory

Specifies the binding directory to which an entry is added. This is a required parameter.

Type
*QUAL
Required
Yes
Case
Uppercase
*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.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Binding directory Binding directory

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB, *USRLIBL

OBJ Object specifications

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. Each element controls the object type and the activation timing of the service program.

Type
*ELEM
Required
Yes
List limit
50
Case
Uppercase
*ALL
All objects of the specified object type residing in the specified library are to be added.
*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*SRVPGM
The object to be added is a service program.
*MODULE
The object to be added is a module.
*IMMED
Activation of the bound service program takes place immediately when the program or service program being created from the binding directory is activated.
*DEFER
Activation of the bound service program may be deferred until a function it exports is called.
Elements in order

Object Object

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Object Object

Type
*GENERIC
Required
No
Length
10
Case
Uppercase

Suggested / special values: *ALL

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL

Object type Object type

Type
*CHAR
Required
No
Default
*SRVPGM
Length
7
Case
Uppercase

Allowed values: *SRVPGM, *MODULE

Activation Activation

Type
*CHAR
Required
No
Default
*IMMED
Length
6
Case
Uppercase

Allowed values: *IMMED, *DEFER

POSITION Position specifications

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

Type
*ELEM
Required
No
Default
*LAST
Case
Uppercase

Suggested / special values: *LAST, *FIRST

*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.
*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. Only one entry can be specified on the OBJ parameter.
Elements in order

Object position Object position

Type
*CHAR
Required
No
Length
8
Case
Uppercase

Allowed values: *AFTER, *BEFORE, *REPLACE

Object Object

Type
*QUAL
Required
No
Case
Uppercase
Qualified parts (object, then library; write LIBRARY/OBJECT)

Object Object

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL

Object type Object type

Type
*CHAR
Required
No
Default
*SRVPGM
Length
7
Case
Uppercase

Allowed values: *SRVPGM, *MODULE

Examples

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

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.

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

Adds a binding directory entry for module TESTOBJ in library TESTLIB to the beginning of the binding directory entries found in the binding directory TESTBNDDIR.

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

Adds an 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 in TESTBNDDIR.

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

Adds entries for module TESTOBJ and service program TESTOBJ2 prior to the binding directory entry for module TESTMOD in library *LIBL, which must exist in TESTBNDDIR.

IBM command documentation

Generated from os/cl/catalog/ADDBNDDIRE.json and os/cl/help/ADDBNDDIRE.json.