$HEX‑TO‑CHAR is an alphanumeric function that returns the display representation of the specified hexadecimal expression.
This function has the following format:
$HEX‑TO‑CHAR(alpha‑expression)
The alphanumeric input must have an even number of valid hexadecimal characters.
This function is the counterpart to $CHAR‑TO‑HEX.
Example
Assume that a one‑byte hexadecimal field is coded in the database for each sales region. The following example sets a one‑character alphanumeric working data field SALES.REGION to the non‑printing hexadecimal code.
<SET‑PROC>
SELECT
WHEN PNL.REGION EQ 'EAST'
SET SALES.REGION = $HEX‑TO‑CHAR('09')
WHEN PNL.REGION EQ 'WEST'
SET SALES.REGION = $HEX‑TO‑CHAR('0A')
ENDSEL
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|