The binding process improves runtime performance as program objects are able to use static procedure calls to routines already bound as part of a program object. Dynamic program calls are not needed to access the routines. Individual module objects created by different ILE HLL compilers can be bound together in the same program object allowing for a routine to be coded in the most appropriate language and then bound to a program object that requires it.
Previously compiled module objects can be bound in various sequences to create new runnable program objects. The previously compiled module objects can be re-used to create new runnable program objects without having to recompile the original source program. This allows a module object to be re-used as needed.
Instead of re-creating programs each time a module object changes, service programs may be used. Common routines can be created as service programs. If the routine changes but its interface does not, or if only upward compatible changes are made to the interface, then the change can be incorporated by re-creating the service program. The program objects and service programs that use these common routines do not have to be re-created.
There are two paths that allow you to create a program object using the binding process. The diagram below shows the two available paths:
Figure 19. Two paths for creating a Program Object
These two paths both use the binding process. The Create Program (CRTPGM) command creates a program object from module objects created from ILE COBOL source programs using the Create COBOL Module (CRTCBLMOD) command, and zero or more service programs.
The Create Bound COBOL (CRTBNDCBL) command creates one or more temporary module objects from one or more ILE COBOL compilation units, and then creates one or more program objects. Once the program object is created, CRTBNDCBL deletes the module object(s) it created. This command performs the combined tasks of the Create COBOL Module (CRTCBLMOD) and Create Program (CRTPGM) commands in a single step. Previously created module objects and service programs can be bound using a binding directory. However, the input source member bound using this step must be the PEP module.
A binding directory contains 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 when 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.
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 the ILE Concepts manual. Characteristics of a *BNDDIR object are:
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.