IBM AS/400 Characteristics of Watches, Setting and Removing Watch Conditions, Display, Source

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 213
Image 213

Setting and Removing Watch Conditions

Characteristics of Watches

You should know the following characteristics about watches before w them:

¹ Watches are monitored system-wide, with a maximum number of 256 wa that can be active simultaneously. This number includes watches set system.

Depending

 

on

overall

system

use,

you

may

be

limited

in

the

number

conditions

you can set at a

given

time.

If

you

try

to

set

a

the maximum number of active watches across the

system

is

excee

receive

an error

message

 

and

the watch condition is not set.

 

Note:

If

 

an

expression

or

a

variable crosses a page boundary, t

 

 

are

used internally to monitor the storage locations. Therefor

 

 

maximum number of expressions or variables that can be watche

 

 

simultaneously

system-wide

ranges

from

128

 

to

256.

 

 

 

 

¹ Watch conditions can only

be

set

when

a

program

is

stopped

under

the expression or variable to be

watched

is

in

scope.

If

this

error message is issued when

a

watch

is

requested, indicating t

sponding

call

stack

entry

does

not

exist.

 

 

 

 

 

 

 

 

 

 

¹ Once

the

watch condition is set, the address of a storage

loca

does

not

 

change. Therefore, if a watch is set on a temporary l

result

in

spurious watch-condition notifications.

 

 

 

 

 

 

 

 

An

example

of

 

this

is

the

automatic

storage

of

an

ILE

RPG

subpro

which

can

be

re-used

after

the

subprocedure

ends.

 

 

 

 

A

watch

condition may

be

 

registered

although

the watched

 

variable

in

scope.

You

must

not

assume

that a variable is in scope

just

watch

condition

has

been

reported.

 

 

 

 

 

 

 

 

 

 

 

 

¹Two watch locations in the same job must not overlap in any way. locations in different jobs must not start at the same storage a wise, overlap is allowed. If these restrictions are violated, an issued.

Note:

Changes made

to

a watched

storage

location are

ignored

if

 

made

by a

job

other

than

the

one that set the watch

con

¹ After

the

command

is

successfully

run,

your

application

is stopped

in your session changes the

contents

of

the

watched

storage

loca

Display

Module

Source

display

is shown.

 

 

 

 

 

If the program has debug data, and a source text view is ava shown. The source line of the statement that was about to be ru content change at the storage-location was detected is highlighted indicates which watch condition was satisfied.

If the program cannot be debugged, the text area of the disp

¹ Eligible programs are automatically

added

to

the debug session if

 

the

watch-stop

condition.

 

 

 

 

 

 

¹

When

multiple watch

conditions

are

hit

on

the

same

program statemen

 

the

first

one

will

be

reported.

 

 

 

 

 

¹

You

can set watch conditions also

when

you are using service job

 

ging,

that

is

when

you

debug

one

job

from

another

job.

Chapter 11. Debugging Programs189

Page 213
Image 213
IBM AS/400 manual Characteristics of Watches, Setting and Removing Watch Conditions, Display, Source