$IHexA

From m204wiki
Revision as of 19:28, 25 October 2012 by JALWiccan (talk | contribs) (1 revision)
Jump to navigation Jump to search

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" />

$IHexA Function

%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