HEX

Use the HEX script function to convert a string to a hexadecimal form. Each individual character of the string can be converted according to the hexadecimal character set.

Syntax

HEX (string)

Parameters

Parameter Description Format
string

Defines the alphanumeric character string to convert.

Note: The maximum number of characters is 128. If you specify a string that is longer than 128 characters, the string is truncated to 128 characters without an error message.

Script literal or script variable

Return Codes

The HEX function returns a string with a maximum of 256 characters in hexadecimal form.

Examples

The following example converts a string into hexadecimal form, and prints the result (554334) in the activation report of the job.

:SET &RET# = HEX("UC4")

:PRINT &RET#

The output in the activation report would look like this:

2018-03-20 15:14:06 - U00020408 554334

See also: