$CHAR‑TO‑HEX is an alphanumeric function that displays non‑printable fields. It returns the hexadecimal value of the specified identifier or literal. If you are using the function to set or move values, the length of the receiving field should be at least twice the size of the sending field to avoid truncation.
This function has the following format:
{alpha‑expression}
{num‑field }
$CHAR‑TO‑HEX( {num‑literal } )
{flag }
Defines an alphanumeric expression.
Specifies the numeric field.
Specifies the numeric literal.
Specifies a flag.
For more information about alphanumeric expressions, numeric fields, numeric literals, and flags, see the PDL Language Concepts topic in the "Procedure Definition Language Concepts and Language Elements" chapter.
Note: Hexadecimal representation of fields on the PC can differ from hexadecimal representation on the mainframe. For this reason, results from logical tests based on hexadecimal representation can differ between the PC and the mainframe.
Example
Assume that B = 'ABCD' sets A to 'C1C2C3C4'. If B was defined in working data as a five‑byte field, the value of A would be 'C1C2C3C440'.
SET A = $CHAR‑TO‑HEX(B)
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|