How to: |
The HEXBYT function obtains the ASCII or EBCDIC character equivalent of a decimal value. It returns a single alphanumeric character in the ASCII or EBCDIC character set. You can use this function to produce characters that, although printable, are not on your keyboard. If the characters you use are not printable, use the CTRAN function to convert them to printable characters.
The display of special characters is platform dependent; not all special characters will display. Printable EBCDIC or ASCII characters and their decimal equivalents are listed in Character Chart for ASCII and EBCDIC.
HEXBYT(decimal_value, output)
where:
Integer
Is the value that is assumed to be an ASCII or EBCDIC code for the character to be presented. A value greater than 255 is treated as the remainder of the decimal_value divided by 256.
Alphanumeric
HEXBYT converts LAST_INIT_CODE to its character equivalent and stores the result in in a column with the format A1.
HEXBYT(LAST_INIT_CODE, 'A1')
On an ASCII platform, for 83, the result is S.
On ASCII platform, for 74, the result is J.
| iWay Software |