When using Intertest r 11 to debug a COBOL program single stepping highlights the wrong statements.
search cancel

When using Intertest r 11 to debug a COBOL program single stepping highlights the wrong statements.

book

Article ID: 133415

calendar_today

Updated On:

Products

InterTest - CICS InterTest - Batch

Issue/Introduction

The client is testing a program with CA Intertest  R 11. When the client compiles and tests with Enterprise Cobol 4.2 the debug session works fine. But when the client compiles and tests with Enterprise COBOL 5.2 they encounter problems when single stepping. When they single step through the program the source code does does not seem to line up correctly.They get unexpected or out of sequence highlighting of statements when single stepping through the program is done

Environment

Z/OS

Cause

The program is compiled with the optimization parameter. You can check the compile output for the program in question. Search for options in effect and see if optimization is turned on for this program.


In the example below optimization is off.  

Options in effect:

 OPTIMIZE(0)

In the example below optimization is on.

Options in effect:

OPTIMIZE(1)

Resolution

The clients COBOL 5.2 program is using Optimization. In the listing you can search for parameter  OPTIMIZE(1) or  OPTIMIZE(2). The client will recompile and link without optimization. This limitation is documented in the Symbolic Support section of the documentation. See Topic Symbolic Support for Optimized Applications. 

CA Application Quality and Testing Tools supports programs that have been optimized, either by the COBOL compiler's OPTIMIZE option or by CA Optimizer or CA Optimizer/II. However, debugging and post mortem analysis of these programs can sometimes result in unexpected behavior.

Often as part of the optimization process, a compiler will relocate individual instructions, statements, or even entire paragraphs so that the optimized program will run more efficiently. This means that some or all of the instructions generated for a given statement may be moved to another statement, or that some or all of the statements in a paragraph may be moved to another paragraph. When this type of optimization occurs, the resulting object program and corresponding listing may not accurately represent the relationship between the source statements and their generated object code, or even between a paragraph label and the statements contained within the paragraph. As a result, there may be times when the breakpoint intercept does not occur, or when the wrong sequence of statements appears to be executed while single-stepping, or when the abending object code does not correspond to the correct source statement. There may also be times when the debugger appears to highlight the wrong statement at a breakpoint intercept or the dump analysis identifies the wrong statement as the abending source statement.