IBM AS/400 Unexpected Results when Evaluating Variables, Stepping Through the Program Object

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 225
Image 225

Stepping Through the Program Object

Scalar

Fields

RPG Definition

> EVAL

String

6A

 

INZ('ABCDEF')

STRING = 'ABCDEF'

 

 

 

> EVAL

Packed1D0

5P

2

INZ(-93.4)

PACKED1D0 = -093.40

 

 

 

> EVAL

ZonedD3D2

3S

2

INZ(-3.21)

ZONEDD3D2 = -3.21

 

 

 

> EVAL

Bin4D3

4B

3

INZ(-4.321)

BIN4D3 = -4.321

 

 

 

> EVAL

Int3

3I

0

INZ(-128)

INT3

= -128

 

 

 

> EVAL

Int5

5I

0

INZ(-2046)

INT5

= -2046

 

 

 

> EVAL

Int10

10I

0

INZ(-31904)

INT10 = -31904

 

 

 

> EVAL

Int20

20I

0

INZ(-463972)

INT20 = -463972

 

 

 

> EVAL

Unsigned3

3U

0

INZ(128)

UNSIGNED3 = 128

 

 

 

> EVAL

Unsigned5

5U

0

INZ(2046)

UNSIGNED5 = 2046

 

 

 

> EVAL

Unsigned10

10U

0

INZ(31904)

UNSIGNED10 = 31904

 

 

 

> EVAL

Unsigned20

20U

0

INZ(463972)

UNSIGNED20 = 463972

 

 

 

> EVAL

DBCSString

3G

 

INZ(G' BBCCDD ')

DBCSSTRING = '"BBCCDD"'

 

 

 

> EVAL

NullPtr

*

 

INZ(*NULL)

NULLPTR = SYP:*NULL

 

 

 

Based Fields

 

 

 

> EVAL

String

6A

 

INZ('ABCDEF')

STRING = 'ABCDEF'

 

 

 

> EVAL

BasePtr

*

 

INZ(%ADDR(String))

BASEPTR = SPP:C01947001218

 

 

 

> EVAL

BaseString

6A

 

BASED(BasePtr)

BASESTRING = 'ABCDEF'

 

 

 

Date, Time, Timestamp Fields

 

 

 

> EVAL

BigDate

D

 

INZ(D'9999-12-31')

BIGDATE = '9999-12-31'

 

 

 

> EVAL

BigTime

T

 

INZ(T'12.00.00')

BIGTIME = '12.00.00'

 

 

 

> EVAL

BigTstamp

Z

 

INZ(Z'9999-12-31-12.00.00.000000

BIGTSTAMP = '9999-12-31-12.00.00.000000'

 

 

 

 

Figure

97. Sample EVAL commands based on Module DBGEX

Unexpected Results when Evaluating Variables

If you are surprised at the value of variables while debugging, c following is true:

¹Your module is optimized. If the module is optimized, the debug

show

the most current value of a variable. Also if you change a

the

debugger, the

effects

of

your change may

not

be

reflecte

program runs.

 

 

 

 

 

 

¹ Some

input fields are not being

read from the file. Normally, input

not

used in the program are not

affected by an input operation.

the

DEBUG keyword

on your

control specification,

all

input

fields

Chapter 11. Debugging Programs201

Page 225
Image 225
IBM AS/400 Unexpected Results when Evaluating Variables, Stepping Through the Program Object, Scalar, Based Fields