IBM AS/400 manual Displaying Fields as Hexadecimal Values, in Character Format

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 229
Image 229
Displaying Fields as Hexadecimal Values

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 hexadecimal format. To display a variable in hexadecimal format, type

EVAL field-name: x number-of-bytes

on

the

debug

command line. Thefieldvariable-nameis

the

name of

the field

tha

you

want

to display in hexadecimal' ' specifiesformat. that the field is to

played

in

hexadecimal format. Thenumbervaria-of-bytesle indicates the number

 

of

bytes

displayed.

If no

length

is'x',specifiedthe sizeafterof thethe field

is

used as

the

length. A minimum of 16

bytes

is

always

displayed.

If

field

is

less

than

16

bytes,

then

theis filledremainingwithspaceuntilzeroesthe 16

 

byte

boundary

is

reached.

 

 

 

 

 

 

For example, the field String is defined as six-character string. To

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

display

a variable

in

character format,

type:

EVAL field-name: c number-of-characters

 

on

the

debug

command

line. Thefieldvariable-nameis

the name of the field tha

you want to display in chara'cter' specifiesformat. the number of characters display.

For example, in the program DEBUGEX, data structure DS2 does not have subfields defined. Several MOVE operations move values into the subfie

Because there are no subfields defined, you cannot display the da

Therefore, to view

its

contents you can use the character display

EVAL DS2:C 20

Result:

DS2:C 20 = 'aaaaaaaaaabbbbbbbbbb'

Chapter 11. Debugging Programs205

Page 229
Image 229
IBM AS/400 manual Displaying Fields as Hexadecimal Values, in Character Format, Stepping Through the Program Object