 




<?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: Reversing a String in RPG</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/reversing-a-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/reversing-a-string/</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 23:11:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/reversing-a-string/#comment-98078</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 21 Oct 2011 20:11:49 +0000</pubDate>
		<guid isPermaLink="false">#comment-98078</guid>
		<description><![CDATA[I assume the interview is over, but here is one possiblity:&lt;pre&gt;
     H debug
     D string          s             15a   varying inz( &#039;abcdef&#039; )

     D rev             s                   like( string )
     D pos             s             10i 0

      /free
          %len( rev ) = 0;

          for pos = %len( string )  downto 1 ;

                rev = rev + %subst( string : pos : 1 ) ;

          endfor;

          string = rev ;

          *inLR = *on ;
          dump ;
          return ;
      /end-free&lt;/pre&gt;
Other possibilities exist.

Tom]]></description>
		<content:encoded><![CDATA[<p>I assume the interview is over, but here is one possiblity:
<pre>
     H debug
     D string          s             15a   varying inz( 'abcdef' )

     D rev             s                   like( string )
     D pos             s             10i 0

      /free
          %len( rev ) = 0;

          for pos = %len( string )  downto 1 ;

                rev = rev + %subst( string : pos : 1 ) ;

          endfor;

          string = rev ;

          *inLR = *on ;
          dump ;
          return ;
      /end-free</pre>
<p>Other possibilities exist.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/reversing-a-string/#comment-98030</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 20 Oct 2011 20:54:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-98030</guid>
		<description><![CDATA[&lt;i&gt;I an declaring an array in RPG as:
 DStringR          s             15A   DIM(%len(%trim(String))  )
I am not getting any compile time error...&lt;/i&gt;

Since %TRIM() isn&#039;t valid in that location, it&#039;s not clear why you wouldn&#039;t get a compile error. Are you absolutely certain?

Tom]]></description>
		<content:encoded><![CDATA[<p><i>I an declaring an array in RPG as:<br />
 DStringR          s             15A   DIM(%len(%trim(String))  )<br />
I am not getting any compile time error&#8230;</i></p>
<p>Since %TRIM() isn&#8217;t valid in that location, it&#8217;s not clear why you wouldn&#8217;t get a compile error. Are you absolutely certain?</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charliebrowne</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/reversing-a-string/#comment-98027</link>
		<dc:creator>charliebrowne</dc:creator>
		<pubDate>Thu, 20 Oct 2011 20:31:49 +0000</pubDate>
		<guid isPermaLink="false">#comment-98027</guid>
		<description><![CDATA[What is the rest of the code?
And when you say &quot;no running&quot;, is it creashing or just not doing anything?]]></description>
		<content:encoded><![CDATA[<p>What is the rest of the code?<br />
And when you say &#8220;no running&#8221;, is it creashing or just not doing anything?</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/8 queries in 0.019 seconds using memcached
Object Caching 297/298 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 01:16:32 -->