IBM AS/400 Frozen Dessert Maker User Manual


 
Stepping Through the Program Object
Example of Stepping Into an OPM Program Using F22
In this example, you use the F22 (Step Into) to step into the OPM program
RPGPGM from the program DEBUGEX.
1. Ensure that the Display Module Source display shows the source for DBGEX.
2. To set an unconditional breakpoint at line 102, which is the last runnable state-
ment before the CALL operation, type Break 102 and press Enter.
3. Press F3 (End program) to leave the Display Module Source display.
4. Call the program. The program stops at breakpoint 102, as shown in Figure 93.
Display Module Source
Program: DEBUGEX Library: MYLIB Module: DBGEX
98 * Fld1a is an overlay field of Fld1. Since Fld1 is initialized
99 * to 'ABCDE', the value of Fld1a(1) is 'A'. After the
100 * following MOVE operation, the value of Fld1a(1) is '1'.
101 *---------------------------------------------------------------
102 C MOVE '1' Fld1a(1)
103
104 *---------------------------------------------------------------
105 * Call the program RPGPGM, which is a separate program object.
106 *---------------------------------------------------------------
107 C Plist1 PLIST
108 C PARM PARM1
109 C CALL 'RPGPGM' Plist1
110
111 *---------------------------------------------------------------
112 * Call c_proc, which imports ExportFld from the main procedure.
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 at line 102.
Figure 93. Display Module Source display of DBGEX Before Stepping Into RPGPGM
5. Press F22 (Step into). One statement of the program runs, and then the
Display Module Source display of RPGPGM is shown, as in Figure 94 on
page 198.
In this case, the first runnable statement of RPGPGM is processed (line 13)
and then the program stops.
Note: You cannot specify the number of statements to step through when you
use F22. Pressing F22 performs a single step.
Chapter 11. Debugging Programs 197