Displaying values of COBOL variables
LIST
command.
The LIST
command causes z/OS® Debugger to log
and display the current values (and names, if requested) of variables. For example,
if you want to display the variables aa, bb, one
,
and their respective values at statement 52 of your program, issue
the following command: AT 52 LIST TITLED (aa, bb, one); GO;
z/OS Debugger sets
a breakpoint at statement 52 (AT
), begins execution
of the program (GO
), stops at statement 52, and displays
the variable names (TITLED
) and their values.
Put commas between the variables when listing more than one. If
you do not want to display the variable names when issuing the LIST
command,
issue LIST UNTITLED
instead of LIST TITLED
.
The value displayed for a variable is always the value that was saved in storage for that variable. In an optimized program, a variable can be temporarily assigned to a register, and the value shown for that variable might differ from the value being used by the program.
If you use the LIST
command to display a National
variable, z/OS Debugger converts
the Unicode data to EBCDIC before displaying it. If the conversion
results in characters that cannot be displayed, enter the LIST
%HEX()
command to display the unconverted Unicode data in
hexadecimal format.
If you use the LIST
command to display a UTF-8
variable, z/OS Debugger converts the UTF-8 data to
EBCDIC before displaying it. If the conversion results in characters that cannot be displayed, enter
the LIST %HEX()
command to display the unconverted UTF-8 data in hexadecimal
format.