COBOL- Debugger and Programmer Role

As a challenging programmer, working with debugger is again challenging task.

The following points to be considered 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 breakpoints to halt execution at any statement in the program. 
 
  •   Set conditional breakpoints to halt execution when a variable is set to a certain value (for example, 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 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. 

About these ads

One thought on “COBOL- Debugger and Programmer Role

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

Have Something to Say? Post Your Comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s