Bind
In z/OS, the **bind** process, often performed by the **Linkage Editor** or the **Program Management Binder (PMB)**, is the final step in creating an executable load module or program object from one or more object modules. It combines compiled or assembled program units with necessary library routines and resolves external references, producing a program ready for execution.
Key Characteristics
-
- Input: Takes one or more
object modules(output from compilers like COBOL, PL/I, C/C++, or assemblers) and optionally existingload modulesorprogram objects. - Output: Produces a
load module(stored in aPDS) or aprogram object(stored in aPDSE), which is the executable form of the program. - External Reference Resolution: Resolves
external symbols(e.g., calls to subroutines, references to common data areas) by locating them in other input modules or specifiedlibraries(e.g.,SYSLIB,STEPLIB,LINKLIB). - Control Statements: Uses
Linkage EditororBinder control statements(e.g.,ENTRY,INCLUDE,NAME,ALIAS,SETCODE,ORDER) to direct the binding process, define entry points, create aliases, and structure the output. - Attributes: Assigns attributes to the load module/program object, such as
REUSABLE,REENTRANT,REFRESHABLE,AC, andAMODE, which are crucial for program behavior in shared environments. - Dynamic Link Libraries (DLLs): When using
PDSEs, theProgram Management Bindercan createprogram objectsthat supportDLLs, enabling modular application design and shared code segments at runtime.
- Input: Takes one or more
Use Cases
-
- Batch Program Execution: Creating executable
load modulesfor COBOL, PL/I, or C/C++ batch applications that will be invoked via JCL. - Online Transaction Processing (CICS/IMS): Binding application programs (e.g., CICS transactions, IMS message processing programs) that need to be loaded and executed within the respective online environments.
- System Utilities and Services: Linking system-level programs, user exits, or custom utilities that extend z/OS functionality.
- Subroutine Libraries: Combining multiple related subroutines into a single
load moduleorprogram objectfor easier management and distribution. - Creating Shared Libraries: Utilizing the
Program Management Binderto createprogram objectsthat function asDynamic Link Librariesfor applications to share common code.
- Batch Program Execution: Creating executable
Related Concepts
The bind process is a critical post-compilation step, directly following compilation (e.g., COBOL compiler) or assembly (e.g., HLASM assembler), which produce object modules. It precedes program execution, as a program cannot run until it has been bound into an executable format. It relies heavily on JCL for specifying input datasets, output libraries, and binder control statements, and interacts with Program Libraries (PDS/PDSE) where the resulting load modules or program objects are stored.
- Use PDSEs for New Development: Prefer
PDSEsoverPDSsfor program libraries, asPDSEssupportprogram objects,DLLs, and offer better space management and concurrency. - Minimize Load Module Size: Include only necessary
object modulesandlibrary routinesto reduce load module size, improving load time and memory utilization. - Specify Libraries Correctly: Ensure
SYSLIBand otherDDstatements in theJCLpoint to all necessaryobject moduleand