As you debug, the
Watch window displays the values of variables, expressions, and data, and also enables you to edit data in writable containers.
To display the window, click
Debug > Windows > Watch > Watch
n while debugging.
Use the
Watch window to:
- View the value of variables using one of these methods to add a variable to the
Watch window:
- Right-click a variable in the editor and click
Add Watch.
- In the
Watch window, click an empty row in the
Name column, and type a variable.
- View the value of expressions by clicking an empty row in the
Name column, and typing an expression.
The supported expressions are: normal numeric arithmetic expression with intrinsic functions and the single use of alphanumeric
intrinsic functions. For example, if you have the following variables defined:
01 a pic 999 value 2.
01 b pic xxxx comp-x value 3.
01 xyz value "abc".
You can use expressions of the type:
a + b * 1
a + function max(10,20)
function upper-case(xyz)
1 + 10
function hex-of(b)
The following expressions are not supported - logical operators such as b-and and b-or; ISO2002 user defined methods; inline
method invokes, and intrinsic functions which are evaluated at compile time.
- View the data in a CICS container by right-clicking a container in the
CICS Channels
window
, and dragging and dropping it into the
Watch window.
- Change the display format for all values from decimal to hexadecimal by right-clicking in the
Watch window, and then clicking
Hexadecimal Display.
- Change the display format of values on an individual row:
- Select a row.
- Press
F2.
- Type a modifier after the name of the variable or the expression as follows:
- h or x
- Type
Variable,h or
Variable,x to always display the variable or the expression in hexadecimal format.
- d
- Type
Variable,d to always display numeric variables in decimal format and strings - as text.
- Edit data in a writable CICS container as hexadecimal data:
Note: A writable CICS container appears in the
CICS Channels
window
with the
Read-Only column set to
False.
- If currently in decimal display mode, switch to hexadecimal display mode by right-clicking in the
Watch window and selecting
Hexadecimal Display from the context menu.
- While in hexadecimal display mode, edit the data in the
Value column as necessary.
Note: When editing, data that extends beyond the size limit of the container is ignored.
Data changes made to CICS container data are reflected in the
CICS Channels
window
.