IBM AS/400 manual Setting and Removing Watch Conditions, Example of a Display Watch Window

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 215
Image 215
Figure 89. Example of a Display Watch Window

Setting and Removing Watch Conditions

Work with Watch

..........................................................

:

 

 

 

Display Watch

 

 

: DEBUGGER

:

 

 

 

 

 

 

 

:

:

Watch Number ....

:

1

 

 

 

:

:

Address

:

080090506F027004

 

 

:

:

Length

:

4

 

 

 

:

:

Number of Hits ..

:

0

 

 

 

:

:

 

 

 

 

 

 

 

:

: Scope when watch was set:

 

 

 

:

:

Program/Library/Type:

PAYROLL

ABC

*PGM

:

:

 

 

 

 

 

 

 

:

:

Module...

:

PAYROLL

 

 

 

:

:

Procedure:

PAYROLL

 

 

 

:

:

Variable.:

SALARY

 

 

 

:

:

 

 

 

 

 

 

 

:

:

F12=Cancel

 

 

 

 

 

 

:

:

 

 

 

 

 

 

 

:

..........................................................

Bottom

Command

===>____________________________________________________________________

ˆF3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel

Figure 89. Example of a Display Watch Window

˜

¹To specify a variable or expression to be watched, type:

WATCH expression

on the debug command line.

This command requests a breakpoint to be setexpressionif the isvalue of changed from its current value.

Note: expression is used to determine the address of the storage watch and must resolve to a location that can be assigned t example:

%SUBSTR(X 1 5)

The scope of the expression variables in a watch is defined by recently issued QUAL command.

¹ To set a watch condition and specify a watch length, type:

WATCH expression : watch length

on a debug command line.

Each watch allows you to monitor and compare a maximum of 128 byt contiguous storage. If the maximum length of 128 bytes is excee condition will not be set, and the debugger issues an error mess

By default, the length of the expression type is also the lengt

comparison operation. watchThe-length parameteroverrides this default. It determines the number of bytes of an expression that should be determine if a change in value has occurred.

For example, if a 4-byte integer is specified as the variable, length parameter, the comparison length is four bytes. However, if length parameter is specified, it overrides the length of the e determining the watch length.

Chapter 11. Debugging Programs191

Page 215
Image 215
IBM AS/400 manual Setting and Removing Watch Conditions, Example of a Display Watch Window, Debugging Programs191