$IHexA: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 2: Line 2:
<span class="pageSubtitle"><section begin="desc" />Convert EBCDIC string to hexadecimal equivalent<section end="desc" /></span>
<span class="pageSubtitle"><section begin="desc" />Convert EBCDIC string to hexadecimal equivalent<section end="desc" /></span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $IHexA function is [[to be entered]].</p>
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $IHexA function is the [[StringToHex (String function)]].</p>


This function converts an EBCDIC string to its hexadecimal equivalent.  
This function converts an EBCDIC string to its hexadecimal equivalent.  
Line 9: Line 9:


The first argument is an arbitrary string.
The first argument is an arbitrary string.
==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %HEX = $IHexA(string)
<p class="syntax"><section begin="syntax" /> %HEX = $IHexA(string)
Line 15: Line 16:
</p>
</p>
<p class="caption">%HEX is set to the hexadecimal equivalent of '''string'''.</p>
<p class="caption">%HEX is set to the hexadecimal equivalent of '''string'''.</p>


For example, in
For example, in
Line 24: Line 24:
</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.
%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.
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[Sirius functions]]</li>
Line 37: Line 38:
<p class="caption">Products authorizing $IHexA
<p class="caption">Products authorizing $IHexA
</p>
</p>


[[Category:$Functions|$IHexA]]
[[Category:$Functions|$IHexA]]

Revision as of 18:20, 1 February 2011

<section begin="desc" />Convert EBCDIC string to hexadecimal equivalent<section end="desc" />

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