Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

HEX

Example 1
Example 2

HEX returns a character string that is the hexadecimal representation of the storage that contains x.

Read syntax diagramSkip visual syntax diagram>>-HEX(x-+----+-)----------------------------------------------><
         '-,z-'
 

HEX(x) returns a character string of length 2 * size(x).

HEX(x,z) returns a character string that contains x with the character z inserted between every set of eight characters in the output string. Its length is 2 * size(x) + ((size(x) - 1)/4).

Under the compiler option USAGE(HEX(CSTG)), the length used in the above calculations is based, for VARYING and VARYINGZ strings, on cstg(x) rather than on stg(x).

x
Expression that represents any variable. The whole number of bytes that contain x is converted to hexadecimal.
z
Expression. If specified, z must have the type CHARACTER(1) NONVARYING.

Integer, offset and pointer values will be presented in bigendian form.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)