$IHexA: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
 
(25 intermediate revisions by 4 users not shown)
Line 2: Line 2:
<span class="pageSubtitle">Convert EBCDIC string to hexadecimal equivalent</span>
<span class="pageSubtitle">Convert EBCDIC string to hexadecimal equivalent</span>


<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>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $IHexA function is the <var>[[StringToHex (String function)|StringToHex]]</var> function.</p>


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


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" />%HEX = $IHexA(string)
<p class="syntax"><span class="term">%HEX</span> = <span class="literal">$IHexA</span>(<span class="term">string</span>)
<section end="syntax" /></p>
<p class="caption">$IHexA Function
</p>
</p>
<p class="caption">%HEX is set to the hexadecimal equivalent of '''string'''.</p>
<p>
</p>
<p>%HEX is set to the hexadecimal equivalent of '''string'''.</p>
 
==Usage notes==
<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>


For example, in
==Examples==
<p class="code"> %JUNK = $IHexA('ABabc')
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.


<h2>Products authorizing {{PAGENAMEE}}</h2><ul class="smallAndTightList">
==Products authorizing {{PAGENAMEE}}==
<li>[[Sirius functions]]</li>
<ul class="smallAndTightList">
<li>[[List of $functions|Sirius functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Janus Open Server]]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>


</ul>
</ul>
<p class="caption">Products authorizing $IHexA
<p>
</p>
</p>


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

Latest revision as of 22:51, 20 September 2018

Convert EBCDIC string to hexadecimal equivalent

Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $IHexA function is the StringToHex 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