Example: Display Variables as hexadecimal values

You can use the EVAL debug command to display the value of variables in hexadecimal format.

To display a variable in hexadecimal format, on the debug command line, type the following:

EVAL variable-name: x  number-of-bytes

Variable-name is the name of the variable that you want to display in hexadecimal format. 'x' specifies that the variable is to be displayed in hexadecimal format and number-of-bytes indicates the number of bytes displayed. If no length is specified after the 'x', the size of the variable is used as the length. A minimum of 16 bytes is always displayed. If the length of the variable is less than 16 bytes, then the remaining space is filled with zeroes until the 16 byte boundary is reached.

CL declaration:  DCL    VAR(&CHAR1) TYPE(*CHAR) LEN(10) VALUE('ABC')
                 DCL    VAR(&CHAR2) TYPE(*CHAR) LEN(10) VALUE('DEF')
 
Debug command:    EVAL &CHAR1:X 32
 
Result:
00000     C1C2C340 40404040 4040C4C5 C6404040 ABC       DEF
00010     40404040 00000000 00000000 00000000     ............