 




<?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: AS400 &#8211; RPGLE, convert character to numeric.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/as400-54/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 17:47:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: The Most-Watched IT Questions: December 6, 2011 - ITKE Community Blog</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99862</link>
		<dc:creator>The Most-Watched IT Questions: December 6, 2011 - ITKE Community Blog</dc:creator>
		<pubDate>Tue, 06 Dec 2011 14:48:21 +0000</pubDate>
		<guid isPermaLink="false">#comment-99862</guid>
		<description><![CDATA[[...] 9. A member is trying to convert a character to a numeric value. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] 9. A member is trying to convert a character to a numeric value. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99464</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Sat, 26 Nov 2011 23:01:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-99464</guid>
		<description><![CDATA[We&#039;re asuming the GEN is a field on the screen format.
That the program does an EXFMT of the screen format before it reaches this point.
Run your program, enter a value in the field press enter
When you get the error select D for dump
Check the spool files for the dump listing.
You will want to search for the values of the fields
GEN and Res_tmp,
Phil

Phil]]></description>
		<content:encoded><![CDATA[<p>We&#8217;re asuming the GEN is a field on the screen format.<br />
That the program does an EXFMT of the screen format before it reaches this point.<br />
Run your program, enter a value in the field press enter<br />
When you get the error select D for dump<br />
Check the spool files for the dump listing.<br />
You will want to search for the values of the fields<br />
GEN and Res_tmp,<br />
Phil</p>
<p>Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99461</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Sat, 26 Nov 2011 21:04:48 +0000</pubDate>
		<guid isPermaLink="false">#comment-99461</guid>
		<description><![CDATA[&lt;i&gt;How to give spaces here while typing .. &lt;/i&gt;

HTML usually collapses extra spaces out of normal text. Formatting is required to preserve spaces, or &#039;&lt;a href=&quot;http://en.wikipedia.org/wiki/Space_%28punctuation%29#Breaking_and_non-breaking_spaces&quot;&gt;required space&#039; characters&lt;/a&gt; might be used when typing. I&#039;d say that the part of the page that displays the original question automatically preserves spaces, but the comment section does not.

To preserve spaces in comments, you need to use the {code} button to enclose code between start and end tags.

For the error, Phil&#039;s probably right. You need to look at the value in Res_tmp to see what characters are not being translated before using the the %dec() or %int() functions.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>How to give spaces here while typing .. </i></p>
<p>HTML usually collapses extra spaces out of normal text. Formatting is required to preserve spaces, or &#8216;<a href="http://en.wikipedia.org/wiki/Space_%28punctuation%29#Breaking_and_non-breaking_spaces">required space&#8217; characters</a> might be used when typing. I&#8217;d say that the part of the page that displays the original question automatically preserves spaces, but the comment section does not.</p>
<p>To preserve spaces in comments, you need to use the {code} button to enclose code between start and end tags.</p>
<p>For the error, Phil&#8217;s probably right. You need to look at the value in Res_tmp to see what characters are not being translated before using the the %dec() or %int() functions.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99459</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Sat, 26 Nov 2011 15:30:16 +0000</pubDate>
		<guid isPermaLink="false">#comment-99459</guid>
		<description><![CDATA[Yes
This will throw an error if the value to convert isn’t digits.
 Therefore, it should be placed in a monitor block to catch errors.
 
The value in Res_tmp is the problem.
Do a Dump and check that value. 
You&#039;ve converting upper case letters to digits but that insn&#039;t the only thing that can cause errors.
Phil]]></description>
		<content:encoded><![CDATA[<p>Yes<br />
This will throw an error if the value to convert isn’t digits.<br />
 Therefore, it should be placed in a monitor block to catch errors.</p>
<p>The value in Res_tmp is the problem.<br />
Do a Dump and check that value.<br />
You&#8217;ve converting upper case letters to digits but that insn&#8217;t the only thing that can cause errors.<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sureyz</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99457</link>
		<dc:creator>sureyz</dc:creator>
		<pubDate>Sat, 26 Nov 2011 13:13:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-99457</guid>
		<description><![CDATA[How to give spaces here while typing .. 

 i gave multiple spaces(using Space bar) but after i pressed Add to Discussion . it show only one space.. 
Sorry ..


Surey..]]></description>
		<content:encoded><![CDATA[<p>How to give spaces here while typing .. </p>
<p> i gave multiple spaces(using Space bar) but after i pressed Add to Discussion . it show only one space..<br />
Sorry ..</p>
<p>Surey..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sureyz</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99456</link>
		<dc:creator>sureyz</dc:creator>
		<pubDate>Sat, 26 Nov 2011 13:07:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-99456</guid>
		<description><![CDATA[yes Tom .. 
i mentioned like this only.
C                    dsply                          i_Gen

But it shows the error  here ..

C                   eval             i_gen  =  %dec(Res_tmp : 15 : 0)

the error is ..

A character representation of a numeric value is in error..(C G D F)


Surey...]]></description>
		<content:encoded><![CDATA[<p>yes Tom ..<br />
i mentioned like this only.<br />
C                    dsply                          i_Gen</p>
<p>But it shows the error  here ..</p>
<p>C                   eval             i_gen  =  %dec(Res_tmp : 15 : 0)</p>
<p>the error is ..</p>
<p>A character representation of a numeric value is in error..(C G D F)</p>
<p>Surey&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99454</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Sat, 26 Nov 2011 11:08:58 +0000</pubDate>
		<guid isPermaLink="false">#comment-99454</guid>
		<description><![CDATA[&lt;pre&gt;C     Alpha:Num_tmp xlate     Gen           Res_tmp&lt;/pre&gt;

Without seeing the value in Gen, there is no way to know what value might end up in Res_tmp. As long as the value can be converted, it should be okay.

&lt;i&gt;C DSPLY i_Gen&lt;/i&gt;

I can&#039;t make sense of that statement. The only format that should compile should be:
&lt;pre&gt;c                   dsply                   i_gen&lt;/pre&gt;
But I don&#039;t see what good that does.

&lt;i&gt;it’s a runtime error…&lt;/i&gt;

When does it show? What statement throws the error?

Tom]]></description>
		<content:encoded><![CDATA[<pre>C     Alpha:Num_tmp xlate     Gen           Res_tmp</pre>
<p>Without seeing the value in Gen, there is no way to know what value might end up in Res_tmp. As long as the value can be converted, it should be okay.</p>
<p><i>C DSPLY i_Gen</i></p>
<p>I can&#8217;t make sense of that statement. The only format that should compile should be:</p>
<pre>c                   dsply                   i_gen</pre>
<p>But I don&#8217;t see what good that does.</p>
<p><i>it’s a runtime error…</i></p>
<p>When does it show? What statement throws the error?</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sureyz</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99445</link>
		<dc:creator>sureyz</dc:creator>
		<pubDate>Sat, 26 Nov 2011 06:12:23 +0000</pubDate>
		<guid isPermaLink="false">#comment-99445</guid>
		<description><![CDATA[This is the code.. 
FMy_dsp     cf      e           workstn     
DAlpha                   c                   &#039;ABCDEFGHIJLKMNOPQRSTUVWXYZ&#039; 
DNum_tmp           c                   &#039;12594632103109812032011649&#039;
C                                         Z_ADD   0                i_Gen                  15  0   
C                                         MOVE      &#039; &#039;                Res_tmp           15
C      Alpha:Num_tmp     XLATE     Gen           Res_tmp
C                                         EVAL       i_Gen = %dec(Res_tmp:15:0)
C                                         DSPLY                       i_Gen
    
             Here the Gen is in my Display FIle  .. I Declared that usiing +B(15), and changed the field name as Gen   ..
                                             
      Simply, my idea is whatever i gave in that Gen filed (Alphabets) have to converted as Numeric... 




Surey..]]></description>
		<content:encoded><![CDATA[<p>This is the code..<br />
FMy_dsp     cf      e           workstn<br />
DAlpha                   c                   &#8216;ABCDEFGHIJLKMNOPQRSTUVWXYZ&#8217;<br />
DNum_tmp           c                   &#8217;12594632103109812032011649&#8242;<br />
C                                         Z_ADD   0                i_Gen                  15  0<br />
C                                         MOVE      &#8216; &#8216;                Res_tmp           15<br />
C      Alpha:Num_tmp     XLATE     Gen           Res_tmp<br />
C                                         EVAL       i_Gen = %dec(Res_tmp:15:0)<br />
C                                         DSPLY                       i_Gen</p>
<p>             Here the Gen is in my Display FIle  .. I Declared that usiing +B(15), and changed the field name as Gen   ..</p>
<p>      Simply, my idea is whatever i gave in that Gen filed (Alphabets) have to converted as Numeric&#8230; </p>
<p>Surey..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sureyz</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99444</link>
		<dc:creator>sureyz</dc:creator>
		<pubDate>Sat, 26 Nov 2011 05:54:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-99444</guid>
		<description><![CDATA[Hi  Tom ..

      it&#039;s a runtime error...
    A character representation of a numeric value is in error...

     this is the error it shows.... 


Surey..]]></description>
		<content:encoded><![CDATA[<p>Hi  Tom ..</p>
<p>      it&#8217;s a runtime error&#8230;<br />
    A character representation of a numeric value is in error&#8230;</p>
<p>     this is the error it shows&#8230;. </p>
<p>Surey..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/as400-54/#comment-99439</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Sat, 26 Nov 2011 00:29:48 +0000</pubDate>
		<guid isPermaLink="false">#comment-99439</guid>
		<description><![CDATA[&lt;i&gt;but it shows error...&lt;/i&gt;

What error does it show? When does it show -- compile or run-time? How are the variables defined? You show the Num_tmp definition, but you don&#039;t show Res_tmp nor igen. If defined properly, there should be no error.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>but it shows error&#8230;</i></p>
<p>What error does it show? When does it show &#8212; compile or run-time? How are the variables defined? You show the Num_tmp definition, but you don&#8217;t show Res_tmp nor igen. If defined properly, there should be no error.</p>
<p>Tom</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 3/10 queries in 0.040 seconds using memcached
Object Caching 393/399 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 17:53:44 -->