CESD - Composite External Symbol Dictionary
The Composite External Symbol Dictionary (CESD) is a crucial section within an IBM z/OS load module or program object. It contains a comprehensive list of all external symbols (such as control sections, entry points, and external references) defined or referenced by the various object modules that comprise the executable program. Its primary purpose is to enable the **Linkage Editor** or **Binder** to resolve cross-module references and prepare the program for execution.
Key Characteristics
-
- Integral Component: The CESD is an essential part of a load module (created by the Linkage Editor) or a program object (created by the Binder).
- Symbol Information: It lists external symbol names, their types (e.g.,
CSECT,ENTRY,EXTRN), their relative addresses within the module, and their lengths. - Reference Resolution: It serves as the central directory for resolving external references between different control sections or separately compiled object modules.
- Generated by Utilities: The CESD is constructed by the Linkage Editor or Binder during the program build process, consolidating the individual External Symbol Dictionaries (ESDs) from each input object module.
- Load-Time Resolution: Information in the CESD is used by the z/OS program loader to ensure that all external references are correctly resolved when the program is loaded into memory for execution.
- Debugging Aid: The contents of the CESD, often viewed via a linkage editor map, are invaluable for diagnosing unresolved external reference errors (
UNRESOLVED EXTERNAL REFERENCE).
Use Cases
-
- Program Linking: The most common use is during the link-edit or bind step, where multiple object modules are combined into a single executable load module or program object.
- Subroutine Calls: Resolving calls from one program or subroutine to an
ENTRYpoint defined in another separately compiled module. - Shared Data Access: Facilitating access to external data areas (
EXTRNreferences) defined in other control sections or common areas. - Dynamic Link Libraries (DLLs): For z/OS DLLs, the CESD plays a role in managing external references between the DLL and its calling programs or other DLLs.
- Program Analysis: System programmers and developers can examine the CESD (via a map listing) to understand the internal structure and external dependencies of a complex application.
Related Concepts
The CESD is directly derived from the External Symbol Dictionary (ESD) sections found in individual object modules. The Linkage Editor and Binder are the utilities responsible for processing these individual ESDs and consolidating them into the single CESD of the final load module or program object. It works in conjunction with CSECTs (Control Sections) and ENTRY points by listing their external names and addresses, allowing for the resolution of external references (EXTRN) across different parts of an application.
- Review Linkage Editor/Binder Maps: Always generate and review the map output (
MAPoption inSYSLMODorSYSLINDD) to inspect the CESD and verify that all external symbols have been correctly resolved. - Consistent Naming: Use clear and consistent naming conventions for CSECTs and
ENTRYpoints across all modules to improve readability and reduce confusion in the CESD. - Manage
SYSLIBConcatenation: Ensure that all necessary object libraries and load libraries are correctly specified in theSYSLIBorSTEPLIBconcatenations for the Linkage Editor/Binder to locate all required external symbols. - Avoid Unresolved References: Strive to resolve all external references during the link-edit/bind step; unresolved references will lead to program abends (e.g.,
S0C1,S0C4) at runtime. - Understand
AMODE/RMODE: Pay close attention toAMODE(Addressing Mode) andRMODE(Residency Mode) attributes for entry points and CSECTs, as mismatches can cause linkage errors or incorrect addressability, even if the symbol is found in the CESD.