Native Inspect Manual (H06.04+)

Native Inspect Manual528122-005
3-1
3
Using Native Inspect With COBOL
Programs
This section describes concepts and additional details for using Native Inspect with
COBOL programs.
How Native Inspect Finds Data Items
Native Inspect follows COBOL scoping rules for finding data items specified in Native
Inspect commands. That is, Native Inspect attempts to find the item in the current
program unit (the program unit where execution is currently suspended). If Native
Inspect cannot find the item in the current program unit, it looks in containing program
units if the data item is declared GLOBAL.
In nested program units, a data item declared in an inner program unit can “hide” a
global data item with the same name that is also declared in an outer program unit.
When execution is suspended in the inner program unit, the only way to access the
item in the outer program unit is to change the currently selected stack frame to the
stack frame containing the outer item.
Handling of SOURCE and COPY Directives
Displaying Lines Included by SOURCE and COPY Directives
Native Inspect does not merge the source lines from SOURCE and COPY directives
into the source listed for a program unit. Therefore, when you enter a list filename
command, only the lines in the specified file are shown, and not the lines included by
any SOURCE or COPY directives in the file. To list any source lines that were copied
by a nested SOURCE or COPY directive, you must enter a separate list command for
the file named in the directive.
Setting Breakpoints at Lines Included by SOURCE and COPY
Directives
In a COBOL program that contains SOURCE and COPY directives, identical line
numbers can occur within a program unit. If, in a break command, you specify a line
number with no qualification, Native Inspect sets a breakpoint at each instance of that
line number. To set a breakpoint at a particular instance of a line number, you must
qualify the line number with the name of the containing file, using the
filename:line-number notation.