IBM AS/400 Frozen Dessert Maker User Manual


 
Stepping Through the Program Object
on the debug command line. The variable
field-name
is the name of the field, data
structure, or array that you want to display or evaluate. The value is shown on the
message line if the EVAL debug command is entered from the Display Module
Source display and the value can be shown on a single line. Otherwise, it is shown
on the Evaluate Expression display.
Figure 96 shows an example of using the EVAL debug command to display the
contents of a subfield LastName.
Display Module Source
Program: DEBUGEX Library: MYLIB Module: DBGEX
61 D LastName 10A INZ('Jones ')
62 D FirstName 10A INZ('Fred ')
63
64 *---------------------------------------------------------------
65 * Define prototypes for called procedures c_proc and switch
66 *---------------------------------------------------------------
67 D c_proc PR * EXTPROC('c_proc')
68 D size 10U 0 VALUE
69 D inzval 1A CONST
70
71 D Switch PR
72 D Parm 1A
73
74 *---------------------------------------------------------------
75 * Define parameters for non-prototyped call
More...
Debug . . . eval LastName____________________________________________________
_______________________________________________________________________________
F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable
F12=Resume F17=Watch variable F18=Work with watch F24=More keys
LASTNAME = 'Jones '
Figure 96. Displaying a Field using the EVAL debug command
Figure 97 on page 201 shows the use of the EVAL command with different types
of RPG fields. The fields are based on the source in Figure 105 on page 212.
Additional examples are also provided in the source debugger online help.
200 ILE RPG for AS/400 Programmer's Guide