UFMT: Converting an Alphanumeric String to Hexadecimal

How to:

The UFMT function converts characters in the source_string to their hexadecimal representation. This function is useful for examining data of unknown format. As long as you know the length of the data, you can examine its content.


Top of page

x
Syntax: How to Convert an Alphanumeric String to Hexadecimal
UFMT(source_string, length, output_format)

where:

source_string

Alphanumeric

Is the string to convert.

length

Integer

Is the number of characters in the source_string.

output_format

Alphanumeric

The format of the output_format must be alphanumeric and its length must be twice the length of the source string.



Example: Converting an Alphanumeric String to Hexadecimal

UFMT converts each value in JOBCODE to its hexadecimal representation and stores it in a column with the format A6.

UFMT(JOBCODE, 3, 'A6')

For A01, the result is C1F0F1.

For A02, the result is C1F0F2.


iWay Software