How to Debug COBOL program in Xpediter

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

The following points need to consider while debugging a COBOL Program:

  • View your source code as it executes.
  • Monitor variable values.
  • Change the value of variables on the fly.
  • Determine what the variable values were at the instant an abend occurred.
  • Set break points to halt execution at any statement in the program.
  • Set conditional break points 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.
  • Work with programs running in or under batch mode, including ISPF/TSO, IMS/DC, and CICS applications.

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 break points 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.

Advertisements

2 thoughts on “How to Debug COBOL program in Xpediter

  1. Pingback: Cobol-Data Challenges(2 of 2) | Mainframe-Srini Blogs

  2. Pingback: How to define PPT,PCT,RCT,TCT,DCT & FCT Entries? – Srinimf

Comments are closed.