<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Over and under Hex display/edit</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/over-and-under-hex-displayedit/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/over-and-under-hex-displayedit/</link>
	<description></description>
	<lastBuildDate>Thu, 20 Jun 2013 11:12:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: gilly400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/over-and-under-hex-displayedit/#comment-52755</link>
		<dc:creator>gilly400</dc:creator>
		<pubDate>Wed, 16 Apr 2008 11:59:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-52755</guid>
		<description><![CDATA[Hi Bruce,

Thanks for the help on this - it works a treat.

Best regards,

Martin Gilbert.]]></description>
		<content:encoded><![CDATA[<p>Hi Bruce,</p>
<p>Thanks for the help on this &#8211; it works a treat.</p>
<p>Best regards,</p>
<p>Martin Gilbert.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bvining</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/over-and-under-hex-displayedit/#comment-52754</link>
		<dc:creator>bvining</dc:creator>
		<pubDate>Wed, 16 Apr 2008 09:05:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-52754</guid>
		<description><![CDATA[Hi, Martin

You got it.  cvtch provides the reverse function of cvthc.

Bruce Vining
&lt;a href=&quot;http://www.brucevining.com/&quot;&gt;http://www.brucevining.com/&lt;/a&gt;
Providing integrated solutions for the System i user community]]></description>
		<content:encoded><![CDATA[<p>Hi, Martin</p>
<p>You got it.  cvtch provides the reverse function of cvthc.</p>
<p>Bruce Vining<br />
<a href="http://www.brucevining.com/">http://www.brucevining.com/</a><br />
Providing integrated solutions for the System i user community</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gilly400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/over-and-under-hex-displayedit/#comment-52753</link>
		<dc:creator>gilly400</dc:creator>
		<pubDate>Wed, 16 Apr 2008 08:42:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-52753</guid>
		<description><![CDATA[Hi Bruce,

I will give this a try, sounds like just the thing I need.  Can I do something similar to convert the hex back to character after editing?  Do I need to call &#039;cvtch&#039; for that?

Best regards,

Martin.]]></description>
		<content:encoded><![CDATA[<p>Hi Bruce,</p>
<p>I will give this a try, sounds like just the thing I need.  Can I do something similar to convert the hex back to character after editing?  Do I need to call &#8216;cvtch&#8217; for that?</p>
<p>Best regards,</p>
<p>Martin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bvining</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/over-and-under-hex-displayedit/#comment-52750</link>
		<dc:creator>bvining</dc:creator>
		<pubDate>Tue, 15 Apr 2008 23:17:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-52750</guid>
		<description><![CDATA[Here&#039;s a little ILE CL program that will do the conversion:

&lt;pre&gt;
PGM        PARM(&amp;DATA_IN &amp;DATA_OUT &amp;LEN_IN)             
DCL        VAR(&amp;DATA_IN) TYPE(*CHAR) LEN(1)             
DCL        VAR(&amp;DATA_OUT) TYPE(*CHAR) LEN(1)            
DCL        VAR(&amp;LEN_IN) TYPE(*INT)                      
CALLPRC    PRC(&#039;cvthc&#039;) PARM((&amp;DATA_OUT) (&amp;DATA_IN) +   
             (&amp;LEN_IN *BYVAL))                          
ENDPGM                                                  
&lt;/pre&gt;

Create it with:
CRTCLMOD MODULE(CHARTOHEX) DBGVIEW(*SOURCE)
CRTPGM PGM(CHARTOHEX) BNDDIR(QC2LE)

And call it from your OPM RPG program with three parameters:
1.  The data you are starting from (the parameter can be any size X)
2.  A receiver variable to get the converted data from (this variable must be defined twice the size as the first parameter - 2X)
3.  A 4-byte binary value (9b 0)  of 2X (ie - the size in bytes of the second parameter)

After you&#039;ve called the program, if parameter 1 was &#039;ABCDEF1234&#039; then parameter 2 will have the value &#039;C1C2C3C4C5C6F1F2F3F4&#039;.  Loop through this taking the &quot;odd&quot; bytes and loading into your first line and the &quot;even&quot; bytes into the second display line.

Bruce Vining]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s a little ILE CL program that will do the conversion:</p>
<pre>
PGM        PARM(&amp;DATA_IN &amp;DATA_OUT &amp;LEN_IN)             
DCL        VAR(&amp;DATA_IN) TYPE(*CHAR) LEN(1)             
DCL        VAR(&amp;DATA_OUT) TYPE(*CHAR) LEN(1)            
DCL        VAR(&amp;LEN_IN) TYPE(*INT)                      
CALLPRC    PRC('cvthc') PARM((&amp;DATA_OUT) (&amp;DATA_IN) +   
             (&amp;LEN_IN *BYVAL))                          
ENDPGM                                                  
</pre>
<p>Create it with:<br />
CRTCLMOD MODULE(CHARTOHEX) DBGVIEW(*SOURCE)<br />
CRTPGM PGM(CHARTOHEX) BNDDIR(QC2LE)</p>
<p>And call it from your OPM RPG program with three parameters:<br />
1.  The data you are starting from (the parameter can be any size X)<br />
2.  A receiver variable to get the converted data from (this variable must be defined twice the size as the first parameter &#8211; 2X)<br />
3.  A 4-byte binary value (9b 0)  of 2X (ie &#8211; the size in bytes of the second parameter)</p>
<p>After you&#8217;ve called the program, if parameter 1 was &#8216;ABCDEF1234&#8242; then parameter 2 will have the value &#8216;C1C2C3C4C5C6F1F2F3F4&#8242;.  Loop through this taking the &#8220;odd&#8221; bytes and loading into your first line and the &#8220;even&#8221; bytes into the second display line.</p>
<p>Bruce Vining</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gilly400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/over-and-under-hex-displayedit/#comment-52747</link>
		<dc:creator>gilly400</dc:creator>
		<pubDate>Tue, 15 Apr 2008 15:58:42 +0000</pubDate>
		<guid isPermaLink="false">#comment-52747</guid>
		<description><![CDATA[Hi Dan,

I wouldn&#039;t call it lousy - a bit of a strange way of doing it, I would never have thought of it.  I may just give this a try.  Will have to see how it performs and will have to write the data to a file first (it&#039;s coming from an MQ message queue).

Best regards,

Martin.]]></description>
		<content:encoded><![CDATA[<p>Hi Dan,</p>
<p>I wouldn&#8217;t call it lousy &#8211; a bit of a strange way of doing it, I would never have thought of it.  I may just give this a try.  Will have to see how it performs and will have to write the data to a file first (it&#8217;s coming from an MQ message queue).</p>
<p>Best regards,</p>
<p>Martin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gilly400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/over-and-under-hex-displayedit/#comment-52746</link>
		<dc:creator>gilly400</dc:creator>
		<pubDate>Tue, 15 Apr 2008 15:51:25 +0000</pubDate>
		<guid isPermaLink="false">#comment-52746</guid>
		<description><![CDATA[Hi Bruce,

I could call an external program, that shouldn&#039;t be any problem.  What did you have in mind?

Best regards,

Martin.]]></description>
		<content:encoded><![CDATA[<p>Hi Bruce,</p>
<p>I could call an external program, that shouldn&#8217;t be any problem.  What did you have in mind?</p>
<p>Best regards,</p>
<p>Martin.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.053 seconds using memcached
Object Caching 338/341 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-20 11:53:35 -->