IBM AS/400 Stepping Through the Program Object, Displaying a Field using the EVAL debug command

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 224
Image 224
ˆ LASTNAME = 'Jones

Stepping Through the Program Object

on the debug command line. Thefieldvariable-nameis the name of the field, dat structure, or array that you want to display or evaluate. The value message line if the EVAL debug command is entered from the Display Mod Source display and the value can be shown on a single line. Otherwise, on the Evaluate Expression display.

Figure 96 shows an example of using the EVAL debug command to display 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 switc￿h

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

of RPG fields. The fields are based

on the

source

in Figure 105

on

Additional

examples are also

provided

in

the

source debugger

online

he

200 ILE RPG for AS/400 Programmer's Guide

Page 224
Image 224
IBM AS/400 manual Stepping Through the Program Object, Displaying a Field using the EVAL debug command, ˆ LASTNAME = Jones