$IHexA: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
Line 17: Line 17:
<p>%HEX is set to the hexadecimal equivalent of '''string'''.</p>
<p>%HEX is set to the hexadecimal equivalent of '''string'''.</p>


For example, in
==Usage notes==
<p class="code"> %JUNK = $IHexA('ABabc')
<ul>
<li>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.
</ul>
 
==Examples==
This statement sets %JUNK to the string <code>C1C2818283</code>:
<p class="code">%JUNK = $IHexA('ABabc')
</p>
</p>
%JUNK would be set to the string <tt>C1C2818283</tt>, and in
And this statement sets %JUNK to the string <code>40F140</code>:
<p class="code"> %JUNK = $IHexA(' 1 ')
<p class="code">%JUNK = $IHexA(' 1 ')
</p>
</p>
%JUNK would be set to the string <tt>40F140</tt>. 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 {{PAGENAMEE}}==  
==Products authorizing {{PAGENAMEE}}==  

Revision as of 23:26, 15 April 2013

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

%HEX = $IHexA(string)

%HEX is set to the hexadecimal equivalent of string.

Usage notes

  • 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.

Examples

This statement sets %JUNK to the string C1C2818283:

%JUNK = $IHexA('ABabc')

And this statement sets %JUNK to the string 40F140:

%JUNK = $IHexA(' 1 ')

Products authorizing $IHexA