<?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: %ERROR function in RPG</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jun 2013 04:33:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: pcatlin</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/#comment-58492</link>
		<dc:creator>pcatlin</dc:creator>
		<pubDate>Wed, 10 Dec 2008 19:01:55 +0000</pubDate>
		<guid isPermaLink="false">#comment-58492</guid>
		<description><![CDATA[The lack of a record in the file is not an error.  That &#039;s why the %error is *OFF after your example.  An error would occur if you tried the CHAIN and the record was locked and the lock wasn&#039;t released before the timeout occurred. (for example).

I always use the codes together:

chain (key) file;
IF %Found and NOT %error
 do something interesting
ENDIF

Phil C]]></description>
		<content:encoded><![CDATA[<p>The lack of a record in the file is not an error.  That &#8216;s why the %error is *OFF after your example.  An error would occur if you tried the CHAIN and the record was locked and the lock wasn&#8217;t released before the timeout occurred. (for example).</p>
<p>I always use the codes together:</p>
<p>chain (key) file;<br />
IF %Found and NOT %error<br />
 do something interesting<br />
ENDIF</p>
<p>Phil C</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: topkat</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/#comment-58460</link>
		<dc:creator>topkat</dc:creator>
		<pubDate>Tue, 09 Dec 2008 21:26:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-58460</guid>
		<description><![CDATA[I&#039;ve had the same problem with %error. I generally use %found:

006 CHAIN PF1
if %found(PF1)

or

006 CHAIN PF1
If %found

This always works]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve had the same problem with %error. I generally use %found:</p>
<p>006 CHAIN PF1<br />
if %found(PF1)</p>
<p>or</p>
<p>006 CHAIN PF1<br />
If %found</p>
<p>This always works</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 6r</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/#comment-58396</link>
		<dc:creator>6r</dc:creator>
		<pubDate>Mon, 08 Dec 2008 13:51:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-58396</guid>
		<description><![CDATA[sorry as stated earlier  i would like to correct my statement that it shows &#039;no err &#039;msg for 888 (eid value)  which doesn&#039;t exist in pf1 (pf) and displays else part of program coding.where as here it shd hav displayed err msg by executing err subroutine but it doesn&#039;t work in this way why so?]]></description>
		<content:encoded><![CDATA[<p>sorry as stated earlier  i would like to correct my statement that it shows &#8216;no err &#8216;msg for 888 (eid value)  which doesn&#8217;t exist in pf1 (pf) and displays else part of program coding.where as here it shd hav displayed err msg by executing err subroutine but it doesn&#8217;t work in this way why so?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 6r</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/#comment-58395</link>
		<dc:creator>6r</dc:creator>
		<pubDate>Mon, 08 Dec 2008 13:48:06 +0000</pubDate>
		<guid isPermaLink="false">#comment-58395</guid>
		<description><![CDATA[and is chaining through numeric value not allowed?]]></description>
		<content:encoded><![CDATA[<p>and is chaining through numeric value not allowed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 6r</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/#comment-58394</link>
		<dc:creator>6r</dc:creator>
		<pubDate>Mon, 08 Dec 2008 13:47:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-58394</guid>
		<description><![CDATA[following is the DDS for pf1 Physical file.

           R REC                     
             ENAME         10        
A            EID            3P 0     
A            ESAL           3P       
A          K EID                     

and when i am putting value 888 for eid which doesn&#039;t exist in pf1(pf)  then also it shows noerr message and goes into the err subroutine of above mentioned code.]]></description>
		<content:encoded><![CDATA[<p>following is the DDS for pf1 Physical file.</p>
<p>           R REC<br />
             ENAME         10<br />
A            EID            3P 0<br />
A            ESAL           3P<br />
A          K EID                     </p>
<p>and when i am putting value 888 for eid which doesn&#8217;t exist in pf1(pf)  then also it shows noerr message and goes into the err subroutine of above mentioned code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gilly400</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/#comment-58393</link>
		<dc:creator>gilly400</dc:creator>
		<pubDate>Mon, 08 Dec 2008 13:29:21 +0000</pubDate>
		<guid isPermaLink="false">#comment-58393</guid>
		<description><![CDATA[Hi,

Is the eid field defined as numeric or character?  You&#039;re chaining with a numeric value.  Try putting quotes around the 006 :-

c &#039;006&#039; CHAIN(E) PF1

Regards,

Martin Gilbert.]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Is the eid field defined as numeric or character?  You&#8217;re chaining with a numeric value.  Try putting quotes around the 006 :-</p>
<p>c &#8217;006&#8242; CHAIN(E) PF1</p>
<p>Regards,</p>
<p>Martin Gilbert.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 6r</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/error-builtin-fn/#comment-58392</link>
		<dc:creator>6r</dc:creator>
		<pubDate>Mon, 08 Dec 2008 13:18:58 +0000</pubDate>
		<guid isPermaLink="false">#comment-58392</guid>
		<description><![CDATA[i used follwoing code to check use of %error but  its not showing right output i am not able to understand why is it so but if i use % found this code works well pls review the following code.

fpf1       if   e           k disk                                      
c     006        CHAIN(E)  PF1                                       
C                   IF        %ERROR                                    
C                   EXSR      ERR                                       
c                   else                                                
C     &#039;no err&#039;      dsply                                               
c                   endif                                               
c                   seton                                            lr 
c     err           begsr                                               
c     &#039;err&#039;         dsply                                               
c                   endsr                                               

and  pf1 does contain 006(eid field of pf1 (pf) ) and still it goes in to err subroutine and displays &#039;err&#039; where as it should have gone in to else part of above code and displayed no err.becouse  EID(006) field of pf1 contains this value in this pf. pls tell me why its happening wrong?]]></description>
		<content:encoded><![CDATA[<p>i used follwoing code to check use of %error but  its not showing right output i am not able to understand why is it so but if i use % found this code works well pls review the following code.</p>
<p>fpf1       if   e           k disk<br />
c     006        CHAIN(E)  PF1<br />
C                   IF        %ERROR<br />
C                   EXSR      ERR<br />
c                   else<br />
C     &#8216;no err&#8217;      dsply<br />
c                   endif<br />
c                   seton                                            lr<br />
c     err           begsr<br />
c     &#8216;err&#8217;         dsply<br />
c                   endsr                                               </p>
<p>and  pf1 does contain 006(eid field of pf1 (pf) ) and still it goes in to err subroutine and displays &#8216;err&#8217; where as it should have gone in to else part of above code and displayed no err.becouse  EID(006) field of pf1 contains this value in this pf. pls tell me why its happening wrong?</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/8 queries in 0.021 seconds using memcached
Object Caching 353/354 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-19 06:49:08 -->