ASCII_CHR
The ASCII_CHR function returns the character that has the ASCII code value that is specified by the argument.
The schema is SYSIBM.
- expression
- An expression that returns a built-in data type of BIGINT, INTEGER,
or SMALLINT.
expression can also be a character string or graphic string data type. The string input is implicitly cast to a numeric value of DECFLOAT(34) which is then assigned to a BIGINT value.
The result can be null; if the argument is null, the result is the null value.
CHR can be specified as a synonym for ASCII_CHR.
Example: Set
:hv with the Euro symbol "€" in CCSID 923:
SET :hv = ASCII_CHR(164); -- x'A4'
Set
:hv with the Euro symbol "€" in CCSID 1252: SET :hv = ASCII_CHR(128); -- x'80'
In
both cases, the "€" is assigned to :hv, but because the
Euro symbol is located at different code points for the two CCSIDs,
the input value is different.