ICB - Intermediate Control Block
An Intermediate Control Block (ICB) is a data structure created by the z/OS Linkage Editor or Loader within a load module. It contains control information and pointers that describe the characteristics and relationships of the various control sections (CSECTs) and entry points within that load module. Its primary purpose is to facilitate the efficient loading and execution of programs by the operating system.
Key Characteristics
-
- Internal Structure: An ICB is an integral part of a
load module, typically located at the beginning or within the program management information of the load module. It's not directly accessible by application programs. - Metadata Container: It holds essential metadata about the
CSECTswithin the load module, such as their size, attributes (e.g., reentrant, reusable), relocation information, and the addresses of their entry points. - Linkage Editor Output: ICBs are generated by the
Linkage Editorduring the program binding process, transformingobject modulesinto an executableload module. TheLoaderthen uses this information at program execution time. - Program Resolution: It plays a crucial role in resolving internal and external references, allowing the operating system to correctly load and link different parts of a program or multiple programs.
- Addressability: Contains information used by the
Loaderto establish correct addressability for the program's various sections once loaded into virtual storage.
- Internal Structure: An ICB is an integral part of a
Use Cases
-
- Program Loading: The z/OS
Loaderuses the ICB to understand the structure of aload module, determine where to load itsCSECTsin virtual storage, and perform necessary address relocations. - Dynamic Program Invocation: When a program invokes another program (e.g., via
CALLin COBOL orLINK/XCTLin CICS), theLoadermight use ICB information to locate and prepare the target program for execution. - Debugging and Analysis: Advanced debugging tools or system utilities might parse ICB information to understand the internal layout of a program, identify
CSECTboundaries, or analyze program flow for troubleshooting. - Shared Program Management: In environments like CICS, where programs might be loaded once and shared by multiple transactions, the ICB helps manage the shared memory segments and entry points for efficient resource utilization.
- Program Loading: The z/OS
Related Concepts
The ICB is intrinsically linked to Load Modules and Control Sections (CSECTs). A load module is the executable unit, and CSECTs are its fundamental building blocks (code or data segments). The Linkage Editor creates the ICB as it combines object modules and resolves references, forming the load module. At runtime, the z/OS Loader interprets the ICB to correctly place CSECTs in virtual storage and establish the program's execution environment. It is a critical component for program management and addressability within the operating system.
- Understand Load Module Structure: For advanced debugging or performance tuning, understanding how ICBs and
CSECTsare organized within aload modulecan help analyze program behavior and memory usage. - Efficient Linkage Editor Options: Use appropriate
Linkage Editoroptions (e.g.,RENTfor reentrant,REUSfor reusable) to ensureload modulesare created with optimal characteristics, which are reflected in their ICBs, for better system performance and resource utilization. - Library Management: Store
load modulesin appropriateProgram Libraries(PDSorPDSE) to ensure theLoadercan efficiently locate and access them, leveraging the ICB information for quick program setup. - Version Control: Maintain strict version control for
load modulesand their source code, as changes toCSECTsor their relationships will directly impact the ICB and the overall program structure, potentially leading to compatibility issues.