Inspect Manual

Using Inspect With COBOL and SCREEN COBOL
Inspect Manual429164-006
10-11
Command Usage Guidelines for COBOL
Programmers
The STEP IN and STEP OUT commands
The STOP command
The TRACE command's REGISTERS clause
Command Usage Guidelines for COBOL
Programmers
The following guidelines for COBOL programmers using Inspect are arranged
alphabetically by Inspect command name. Not all commands are listed.
BREAK
You can set a breakpoint at a line number, a paragraph, a paragraph of a section, a
section, or the program entry point. You can qualify the following names with a
scope name.
You can also set a breakpoint at an offset from a line number, a paragraph, a
paragraph of a section, a section, or the program entry point. Offsets are given as
a number of sentences (Inspect calls them STATEMENTS), statements (Inspect
calls them VERBS), or machine instructions or pseudo instructions (Inspect calls
them INSTRUCTIONS).
For SCREEN COBOL, you can set a breakpoint only at the start of an inactive
program unit. Also, when you set a breakpoint at the entry of a program unit,
Inspect does not check your SCREEN COBOL library to ensure that the given
program unit exists. Consequently, if you set a breakpoint at a nonexistent
program unit, Inspect does not display a warning message.
When you run COBOL-compiled processes, you can also set and clear a single
breakpoint in the data area. Because a data breakpoint monitors only one word in
the data area, any operation that changes the contents of that word (alone, or as
part of a group item) will trigger the Inspect break event.
A break set at the entry point to a program unit will occur before any initialization
(VALUE clause actions). If you set a breakpoint at a program unit entry point, you
should enter a STEP 1 VERB command when Inspect stops there. Alternatively, a
break set at the first paragraph of a program unit will have the desired effect.
If you set a breakpoint at ABEND and your COBOL program terminates
abnormally, you will find that your program is executing system code instead of
user code. To access code or data in your program, you must qualify code and
data references to include a scope path. Alternatively, you can change the current
scope path with the SCOPE command.
If you have a paragraph name in your program called ABEND, entering BREAK
ABEND causes Inspect to set a breakpoint at the paragraph, not at abnormal
program end.