Adding variables to the Monitor window
When you add a variable to the Monitor window, you are monitoring the value of that variable. To add a variable to the Monitor window, do one of the following options:
- To use the
MONITOR LIST
command, do the following steps:- Move the cursor to the command line.
- Type the following command, substituting your variable name for variable-name:
MONITOR LIST variable-name;
- Press Enter. z/OS® Debugger assigns the variable a reference number between 1 and 99, adds the variable to the Monitor window (above the automonitor section, if it is displayed), and displays the current value of the variable.
Every time z/OS Debugger receives control or every time you enter a z/OS Debugger command that can affect the display, z/OS Debugger updates the value of variable-name in the Monitor window so that the Monitor window always displays the current value.
- To use the
M
prefix command, do the following steps:- Scroll through the Source window until you find the operand you want to monitor.
- Move your cursor to the prefix area of the line that contains the operand you want to monitor.
- Type in an "M" in the prefix area, then press Enter
to monitor the value of all of the operands on that line. If you want
to monitor the value of a specific operand on that line, do the following
steps:
- If you are debugging a high-level language program, beginning
from the left and with number 1, assign a number to the first occurrence
of each variable. For example, in the following line, rightSide is
1, leftSide is 2, and bottomSide is 3:
rightSide = (leftSide * leftSide) + (bottomSide * bottomSide);
If you are debugging an assembler or disassembly program, beginning from the left and beginning with number 1 assign the each operand of the machine instruction a number.
- Type in an "M" in the prefix area, followed by the number assigned to the operand that you want to monitor. If you wanted to monitor the value of leftSide in the previous example, you would enter "M2" in the prefix area.
- Press Enter.
- If you are debugging a high-level language program, beginning
from the left and with number 1, assign a number to the first occurrence
of each variable. For example, in the following line, rightSide is
1, leftSide is 2, and bottomSide is 3:
Every time z/OS Debugger receives control or every time you enter a z/OS Debugger command that can affect the display, z/OS Debugger updates the value of leftSide in the Monitor window so that the Monitor window always displays the current value.
Refer to the following topics for more information related to the material discussed in this topic.
- Related tasks
- Adding variables to the Monitor window automatically