In this example you set an unconditional
job breakpoint using
F6 (Add/Clear breakpoint). The breakpoint is to be set on the first runnable
Calculation specification so that the various fields and data structures can
be displayed.
- To work with a module type DSPMODSRC and press Enter. The Display
Module Source display is shown.
- If you want to set the job breakpoint in the module shown, continue
with step 3. If you want to set a job breakpoint in a
different module, type:
DISPLAY MODULE module-name
on the debug
command line where module-name is the name of the
module that you want to display.
- To set an unconditional breakpoint on the first Calculation
specification, place the cursor on line 88.
- Press F6 (Add/Clear breakpoint). If there is no breakpoint
on the line 88, then an unconditional breakpoint is set on that line, as shown
in Figure 1. If there is a breakpoint on the line, it is removed.
Note: Because we want the breakpoint on the first Calculation
specification, we could have placed the cursor on any line before the start
of the calculation specifications and the breakpoint would still have been
placed on line 88, since it is the first runnable statement.
Figure 1. Setting an Unconditional Job Breakpoint Display Module Source
Program: DEBUGEX Library: MYLIB Module: DBGEX
84 *---------------------------------------------------------------
85 * Move 'a's to the data structure DS2. After the move, the
86 * first occurrence of DS2 contains 10 character 'a's.
87 *---------------------------------------------------------------
88 C MOVE *ALL'a' DS2
89
90 *---------------------------------------------------------------
91 * Change the occurrence of DS2 to 2 and move 'b's to DS2,
92 * making the first 10 bytes 'a's and the second 10 bytes 'b's
93 *---------------------------------------------------------------
94 C 2 OCCUR DS2
95 C MOVE *ALL'b' DS2
96
97 *---------------------------------------------------------------
98 * Fld1a is an overlay field of Fld1. Since Fld1 is initialized
More...
Debug . . . _________________________________________________________________
_______________________________________________________________________________
F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable
F12=Resume F17=Watch variable F18=Work with watch F24=More keys
Breakpoint added to line 88.
- After the breakpoint is set, press F3 (Exit) to leave the Display Module
Source display. The breakpoint is not removed.
- Call the program. When a breakpoint is reached, the program stops and
the Display Module Source display is shown again, with the line containing
the breakpoint highlighted. At this point you can step through the program
or resume processing.