Master CICS Execution Diagnostic Facility including setup, usage, step-by-step debugging, and breakpoint management for effective application troubleshooting.
CICS Execution Diagnostic Facility (CEDF) is IBM's built-in debugging tool that provides interactive debugging capabilities for CICS applications. It allows developers to step through programs line by line, examine variables, set breakpoints, and trace program execution without requiring external tools.
By the end of this tutorial, you'll understand CEDF concepts, setup procedures, debugging techniques, breakpoint management, and how to effectively troubleshoot CICS applications using CEDF.
CEDF is a powerful debugging tool integrated into CICS that provides real-time debugging capabilities. It allows developers to interactively debug CICS programs by stepping through code, examining variables, and controlling program execution flow.
Think of CEDF like a video player with pause, rewind, and slow-motion controls. Instead of watching a movie, you're watching your program run. You can pause it at any point, look at what's happening in detail, and then continue or step forward one frame at a time.
In CICS, CEDF lets you "pause" your program at any line of code, look at what values your variables have, change them if needed, and then continue running. It's like having a microscope for your program - you can see exactly what's happening inside it as it runs.
Setting up CEDF requires proper configuration in CICS system parameters and resource definitions. Once configured, CEDF can be used to debug transactions and programs interactively.
Enable CEDF in CICS system initialization parameters:
123456789101112SIT Parameters for CEDF: CEDF=YES /* Enable CEDF globally */ CEDFTRANS=YES /* Enable CEDF for transactions */ CEDFPROG=YES /* Enable CEDF for programs */ CEDFTERM=3270 /* Terminal type for CEDF */ CEDFMAX=10 /* Maximum concurrent CEDF sessions */ Security Considerations: - CEDF should be disabled in production - Use CEDF only in development/test environments - Restrict CEDF access to authorized developers - Monitor CEDF usage for security compliance
Define CEDF resources and security settings:
123456789101112131415CEDF Resource Definitions: DEFINE TRANSACTION(CEDF) GROUP(DEBUGGRP) DEFINE PROGRAM(CEDF) GROUP(DEBUGGRP) DEFINE TERMINAL(CEDF) GROUP(DEBUGGRP) Security Configuration: - Define CEDF user profiles - Set appropriate access controls - Configure terminal security - Enable audit logging Example Security Setup: CEDA DEFINE TRANSACTION(CEDF) GROUP(DEBUGGRP) CEDA DEFINE PROGRAM(CEDF) GROUP(DEBUGGRP) CEDA DEFINE TERMINAL(CEDF) GROUP(DEBUGGRP)
Start CEDF for specific transactions:
12345678910111213141516171819Starting CEDF for Transactions: 1. Sign on to CICS terminal 2. Enter transaction ID: CEDF 3. Specify target transaction: ACCT 4. CEDF starts debugging session 5. Step through program execution Example Session: CICS Terminal: CEDF Target Transaction: ACCT Program: ACCTINQ Debug Mode: Interactive CEDF Commands Available: - STEP: Execute one line - GO: Continue execution - DISPLAY: Show variables - SET: Modify variables - BREAK: Set breakpoints
Debug specific programs directly:
1234567891011121314151617181920Program Debugging Steps: 1. Start CEDF session 2. Specify target program: ACCTINQ 3. Set initial breakpoints 4. Begin program execution 5. Step through program logic CEDF Program Commands: - LOAD: Load program for debugging - START: Begin program execution - STEP: Execute one instruction - DISPLAY: Show program variables - MODIFY: Change variable values - BREAK: Set/clear breakpoints Example Program Debug: CEDF> LOAD ACCTINQ CEDF> BREAK 100 CEDF> START CEDF> STEP
Breakpoints are essential tools in CEDF that allow developers to pause program execution at specific points for detailed examination. Effective breakpoint management is crucial for efficient debugging.
Stop execution at specific line numbers:
1234567891011121314Line Breakpoint Commands: BREAK 100 /* Set breakpoint at line 100 */ BREAK 200,300 /* Set breakpoints at lines 200 and 300 */ BREAK * /* List all breakpoints */ BREAK 100 OFF /* Remove breakpoint at line 100 */ BREAK ALL OFF /* Remove all breakpoints */ Example Usage: CEDF> BREAK 150 Breakpoint set at line 150 CEDF> GO Program stopped at line 150 CEDF> DISPLAY WS-ACCOUNT-NUMBER WS-ACCOUNT-NUMBER = 1234567890
Stop execution when specific conditions are met:
123456789101112Conditional Breakpoint Commands: BREAK 100 IF WS-ERROR-CODE = 'E' BREAK 200 IF WS-ACCOUNT-BALANCE < 0 BREAK 300 IF WS-CUSTOMER-ID = 'CUST001' Example Usage: CEDF> BREAK 150 IF WS-ERROR-FLAG = 'Y' Conditional breakpoint set at line 150 CEDF> GO Program stopped at line 150 (condition met) CEDF> DISPLAY WS-ERROR-FLAG WS-ERROR-FLAG = Y
Set breakpoints during program execution:
1234567891011121314151617Dynamic Breakpoint Usage: 1. Start program execution 2. Set breakpoints as needed 3. Modify breakpoints during execution 4. Remove breakpoints when done Example Session: CEDF> GO Program running... CEDF> BREAK 250 Breakpoint set at line 250 CEDF> GO Program stopped at line 250 CEDF> BREAK 250 OFF Breakpoint removed from line 250 CEDF> GO Program continues execution
CICS Execution Diagnostic Facility (CEDF) is a powerful debugging tool that provides interactive debugging capabilities for CICS applications. Through proper setup, effective usage techniques, and strategic breakpoint management, developers can efficiently troubleshoot and debug CICS programs.
CEDF's step-by-step execution, variable inspection, and breakpoint capabilities make it an essential tool for CICS application development and maintenance, enabling developers to identify and resolve issues quickly and effectively.