Binding Directory

A binding directory lists the names of modules and service programs that you may need when creating an ILE program or service program. Modules or service programs listed in a binding directory are used only if they provide an export that can satisfy any currently unresolved import requests. A binding directory is a system object that is identified to the system by the symbol *BNDDIR.

Binding directories are optional. The reasons for using binding directories are convenience and program size.
  • They offer a convenient method of listing the modules or service programs that you may need when creating your own ILE program or service program. For example, one binding directory may list all the modules and service programs that provide math functions. If you want to use some of those functions, you specify only the one binding directory, not each module or service program you use.
    Note: The more modules or service programs a binding directory lists, the longer it may take to bind the programs. Therefore, you should include only the necessary modules or service programs in your binding directory.
  • Binding directories can reduce program size because you do not specify modules or service programs that do not get used.

Very few restrictions are placed on the entries in a binding directory. The name of a module or service program can be added to a binding directory even if that object does not yet exist.

For a list of CL commands used with binding directories, see CL Commands Used with ILE Objects.

Figure 1 shows a conceptual view of a binding directory.

Figure 1. Conceptual View of a Binding Directory
Characteristics of a *BNDDIR object:
  • Convenient method of grouping the names of service programs and modules that may be needed to create an ILE program or service program.
  • Because binding directory entries are just names, the objects listed do not have to exist yet on the system.
  • The only valid library names are *LIBL or a specific library.
  • The objects in the list are optional. The named objects are used only if any unresolved imports exist and if the named object provides an export to satisfy the unresolved import request.