$IHexA: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
(No difference)

Revision as of 00:37, 26 October 2012

Convert EBCDIC string to hexadecimal equivalent

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $IHexA function is the StringToHex (String function).

This function converts an EBCDIC string to its hexadecimal equivalent.

The $IHexA function accepts one argument and returns a string result that is the hexadecimal representation of the first argument.

The first argument is an arbitrary string.

Syntax

<section begin="syntax" />%HEX = $IHexA(string) <section end="syntax" />

%HEX is set to the hexadecimal equivalent of string.

For example, in

%JUNK = $IHexA('ABabc')

%JUNK would be set to the string C1C2818283, and in

%JUNK = $IHexA(' 1 ')

%JUNK would be set to the string 40F140. Because the result string can be at most 255 bytes long and the result string is always twice as long as the input string, any input string longer than 127 bytes, will produce a 254 byte result string representing the first 127 characters in the input string.

Products authorizing $IHexA