MainframeMaster

Execution Diagnostic Facility (CEDF)

Master CICS Execution Diagnostic Facility including setup, usage, step-by-step debugging, and breakpoint management for effective application troubleshooting.

Debugging Tool
Progress0 of 0 lessons

🔍
Introduction to CEDF

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.

🎯Learning Objective

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.

🛠️
What is 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.

CEDF Explained Simply

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.

Key CEDF Features

👣Step-by-Step Execution

  • Execute one line at a time
  • Control program flow
  • Examine execution path
  • Trace program logic

🔍Variable Inspection

  • Examine variable values
  • Modify variable values
  • View data structures
  • Monitor changes

⏸️Breakpoint Management

  • Set stopping points
  • Conditional breakpoints
  • Dynamic breakpoints
  • Breakpoint management

📊Program Analysis

  • Execution flow analysis
  • Performance monitoring
  • Resource usage tracking
  • Error condition analysis

⚙️
CEDF Setup and Usage

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.

CEDF Configuration

🔧System Initialization Parameters

Enable CEDF in CICS system initialization parameters:

text
1
2
3
4
5
6
7
8
9
10
11
12
SIT 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

🔐Resource Definitions

Define CEDF resources and security settings:

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CEDF 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)

Starting CEDF Sessions

🚀Transaction-Based Debugging

Start CEDF for specific transactions:

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Starting 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

📋Program-Based Debugging

Debug specific programs directly:

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Program 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

⏸️
Breakpoint Management

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.

Types of Breakpoints

📍Line Breakpoints

Stop execution at specific line numbers:

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Line 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

🔍Conditional Breakpoints

Stop execution when specific conditions are met:

text
1
2
3
4
5
6
7
8
9
10
11
12
Conditional 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

🔄Dynamic Breakpoints

Set breakpoints during program execution:

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Dynamic 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

📝
Summary

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.