%HEX
Returns the hexadecimal value of an operand.
- reference
- One of the following:
- COBOL or PL/I reference
- C or C++ lvalue
- assembler, or disassembly
- 'reference'
-
Use the syntax of 'reference' enclosed in apostrophes (') only for LangX COBOL programs. It is not supported in any other programming language.
Examples
C and C++: To display the internal representation of the packed decimal
variable
zvar1
whose external representation is 235, enter
the following command.
LIST %HEX(zvar1);
The Log window displays the hexadecimal string 235C
.
COBOL: To display the external representation of the packed decimal
pvar3
,
defined as PIC 9(9)
, from 1234 as its hexadecimal (or internal)
equivalent, enter the following command.
LIST %HEX (pvar3);
The Log window displays the hexadecimal string 01234F
.
Refer to the following topics for more information related to the material discussed in this topic.
- Related references
- LIST expression command