DFHCMACD
`DFHCMACD` is a core CICS system module that contains the macro definitions for CICS command-level statements. It is primarily used by the CICS translator to convert `EXEC CICS` commands within application programs (COBOL, PL/I, Assembler) into standard language `CALL` statements that the native compiler can process. This module is fundamental for enabling high-level CICS application programming. DFHCMACD is the CICS **terminal auto-install control program**. It is invoked by CICS when a new terminal attempts to connect to the region and a corresponding resource definition does not already exist. Its primary purpose is to dynamically create a `TERMINAL` and `TYPETERM` definition in memory, allowing the terminal to connect and operate without requiring prior manual configuration in the CICS `CSD`.
Key Characteristics
-
- Translator Input: Serves as a crucial input for the CICS translator, providing the syntax and structure for all CICS command-level macros.
- Macro Expansion: Defines how CICS commands (e.g.,
EXEC CICS SEND,EXEC CICS RECEIVE,EXEC CICS LINK) are expanded into the correspondingCALLstatements with specific parameters. - Language Agnostic: Provides definitions that are utilized by the CICS translator for programs written in various languages, including COBOL, PL/I, and Assembler.
- Version Specific: Each CICS release typically comes with its own version of
DFHCMACD, reflecting new commands, updated syntax, or deprecated features for that specific CICS environment. - System Library Member: Resides in a CICS system library, typically
SDFHLOAD, and is accessed by the CICS translator during the compilation process. - Static Definitions: Contains static definitions that guide the translator's conversion process, ensuring consistency and correctness across CICS applications.
Use Cases
-
- CICS Application Compilation: Essential for the successful compilation of any CICS application program that uses
EXEC CICScommands, as it enables the translator to understand and convert these commands. - Program Development Workflow: Integrated into the standard CICS program development workflow, where source code containing CICS commands is first passed through the CICS translator before being compiled by the language compiler.
- Maintaining Compatibility: Ensures that CICS applications developed for a specific CICS version are translated correctly, leveraging the command set and syntax defined by that version's
DFHCMACD. - Debugging Translation Issues: Helps in diagnosing translation errors where an
EXEC CICScommand might be misspelled, incorrectly formatted, or not supported by the CICS version associated with theDFHCMACDmodule.
- CICS Application Compilation: Essential for the successful compilation of any CICS application program that uses
Related Concepts
DFHCMACD is intrinsically linked to the CICS Translator, which uses its definitions to convert high-level EXEC CICS commands into standard language CALL statements. This process is vital for CICS Application Programs written in languages like COBOL, allowing developers to use a simplified API. While DFHCMACD defines the *commands*, the CICS System Definition (CSD) defines the *resources* (e.g., programs, transactions, files) that these commands interact with at runtime. It forms a foundational part of the CICS API for command-level programming.
- Version Alignment: Always ensure that the
DFHCMACDmodule used by the CICS translator during compilation matches the target CICS region's version to prevent runtime errors or unexpected behavior. - Automated Build Processes: Incorporate the CICS translation step, which implicitly relies on
DFHCMACD, into automated JCL-based build and deployment pipelines for consistency and efficiency. - Error Analysis: When encountering CICS command-related translation errors, verify the command syntax against IBM CICS documentation and ensure the correct
DFHCMACDversion is being referenced. - Recompilation on Upgrade: After a CICS system upgrade, it is often a best practice to recompile existing CICS applications, especially if new CICS features are to be utilized, to ensure they are translated using the latest
DFHCMACDdefinitions.