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. The script function returns a string with a maximum of 256 characters in hexadecimal form.

Syntax

HEX (string)

Parameters

  • HEX
    Converts a string to hexadecimal format

  • string
    Alphanumeric character string
    Format: script literal or script variable
    Maximum characters: 128
    Important! If you specify a string that is longer than 128 characters, the string is truncated to 128 characters without an error message.

Example

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: