How to Debug COBOL Program in Xpediter

In the Mainframe environment working as a Programmer is a challenging task. And working on a debugger is again a double challenging task.

How to Debug COBOL Program

  1. View your source code as it executes.
  2. Monitor variable values.
  3. Change the value of variables on the fly.
  4. Determine what the variable values were at the instant an abend occurred.
  5. Set breakpoints to halt execution at any statement in the program.
  6. Set conditional breakpoints to halt execution when a variable is set to a certain value (such as REC-COUNT = 100) or when the value contained in a given address in memory changes. This latter feature is especially useful to help you find problems that have the effect of inadvertently overwriting parts of memory.
  7. Work with programs running in or under the batch mode, including ISPF/TSO, IMS/DC, and CICS applications.

Additional Debugging Points

The sooner you learn the capabilities of your debugger, the faster your debugging cycle.  When trying to debug complex and unfamiliar code, use the debugger together with a utility that can generate a hard-copy hierarchy chart of your program.

Set breakpoints at the beginning of each PERFORM block in the program and trace the logic flow for various options or test cases on the chart using different colored highlighters.

In the mainframe environment, a popular debugging tool is a Compuware product known as Xpediter.

Xpediter allows you to set breakpoints and step through the program using COBOL code instead of trying to decipher machine code. You can examine the value of all variables at the breakpoints. Compuware also supplies Abend-AID, considered an industry staple.

Related articles

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.