IBM AS/400 Frozen Dessert Maker User Manual


 
Stepping Through the Program Object
> EVAL IN02
Identifier does not exist.
> EVAL *IN02
*IN02 = '1'
> EVAL *IN(02)
*IN(02) = '1'
> EVAL *INLR
*INLR = '0'
> EVAL *IN(LR)
Identifier does not exist.
> EVAL *IN(1..6) ** To display a range of indicators **
*IN(1) = '0'
*IN(2) = '1'
*IN(3) = '0'
*IN(4) = '1'
*IN(5) = '0'
*IN(6) = '1'
Figure 101. Sample EVAL commands for an Array
Displaying Fields as Hexadecimal Values
You can use the EVAL debug command to display the value of fields in
hexadecimal format. To display a variable in hexadecimal format, type:
EVAL field-name: x number-of-bytes
on the debug command line. The variable
field-name
is the name of the field that
you want to display in hexadecimal format. 'x' specifies that the field is to be dis-
played in hexadecimal format. The variable
number-of-bytes
indicates the number
of bytes displayed. If no length is specified after the 'x', the size of the field is
used as the length. A minimum of 16 bytes is always displayed. If the length of the
field is less than 16 bytes, then the remaining space
is filled with zeroes
until the 16
byte boundary is reached.
For example, the field String is defined as six-character string. To find out the
hexadecimal equivalent of the first 3 characters, you would enter:
EVAL String: x 3
Result:
00000 C1C2C3.. ........ ........ ........ - ABC.............
Displaying Fields in Character Format
You can use the EVAL debug command to display a field in character format. To
display a variable in character format, type:
EVAL field-name: c number-of-characters
on the debug command line. The variable
field-name
is the name of the field that
you want to display in character format. 'c' specifies the number of characters to
display.
For example, in the program DEBUGEX, data structure DS2 does not have any
subfields defined. Several MOVE operations move values into the subfield.
Because there are no subfields defined, you cannot display the data structure.
Therefore, to view its contents you can use the character display function of EVAL.
EVAL DS2:C 20 Result: DS2:C 20 = 'aaaaaaaaaabbbbbbbbbb'
Chapter 11. Debugging Programs 205