UFMT: Converting an Alphanumeric String to Hexadecimal

How to:

The UFMT function converts characters in an alphanumeric 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)

where:

source_string

Alphanumeric

Is the alphanumeric string to convert.

length

Integer

Is the number of characters in source_string.

output

Alphanumeric

The format of output must be alphanumeric and its length must be twice that of length.



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