IBM AS/400 Frozen Dessert Maker User Manual


 
Stepping Through the Program Object
on the debug command line, the next five statements of your program object are
run, then the program object is stopped again and the Display Module Source
display is shown.
When a call statement to another program or procedure is encountered in a debug
session, you can:
Step over the call statement, or
Step into the call statement.
A call statement for ILE RPG includes any of the following operations:
CALL
CALLB
CALLP
Any operation where there is an expression in the extended-factor 2 field, and
the expression contains a call to a procedure.
If you choose to step over the call statement, then you will stay inside the current
procedure. The call statement is processed as a single step and the cursor moves
to the next step after the call. Step over is the default step mode.
If you choose to step into the call statement, then each statement inside the call
statement is run as a single step. Depending on the number of steps specified, the
step command may end inside the call statement, in which case the source for the
call statement is shown in the Display Module Source display.
Note: You cannot step over or step into RPG subroutines. You can, however, step
over and into subprocedures.
Stepping Over Call Statements
You can step over call statements by using:
F10 (Step) on the Display Module Source display
The STEP OVER debug command
You can use F10 (Step) on the Display Module Source display to step over a call
statement in a debug session. If the call statement to be run is a CALL operation to
another program object, then pressing F10 (Step) will cause the called program
object to run to completion before the calling program object is stopped again. Simi-
larly, if the call statement is an EVAL operation where a procedure is called in the
expression, then the complete EVAL operation is performed, including the call to
the procedure, before the calling program or procedure is stopped again.
Alternately, you can use the STEP OVER debug command to step over a call
statement in a debug session. To use the STEP OVER debug command, type:
STEP number-of-statements OVER
on the debug command line. The variable
number-of-statements
is the number of
statements that you want to run in the next step before processing is halted again.
If this variable is omitted, the default is 1.
Chapter 11. Debugging Programs 195