BYTVAL: Translating a Character to Decimal

How to:

The BYTVAL function translates a character to the ASCII, EBCDIC, or Unicode decimal value that represents it, depending on the operating system.


Top of page

x
Syntax: How to Translate a Character
BYTVAL(character, output)

where:

character

Alphanumeric

Is the character to be translated. If you supply more than one character, the function evaluates the first.

output

Integer



Example: Translating the First Character of a Field

BYTVAL translates the first character of LAST_NAME into its ASCII decimal value and stores the result in a column with the format I3.

BYTVAL(LAST_NAME,'I3')

For SMITH, the result is 83.

For JONES the result is 74.


iWay Software