 




<?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: How to direct program in *PPSR</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-to-direct-program-in-ppsr/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-direct-program-in-ppsr/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 01:03:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-direct-program-in-ppsr/#comment-92904</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 02 Jun 2011 22:12:22 +0000</pubDate>
		<guid isPermaLink="false">#comment-92904</guid>
		<description><![CDATA[&lt;i&gt;so you specify where the function is to continue processing.&lt;/i&gt;

That is true, but the values that can be specified are limited. They all refer to specific points in &quot;Cycle processing&quot;. There wouldn&#039;t seem to be an appropriate &quot;Cycle&quot; point that handles a particular iteration of a looping structure.

A *PSSR is certainly valid. But it always needs to be remembered that if one exists, it will be called for &lt;i&gt;any error&lt;/i&gt; that is not explicitly handled -- &lt;i&gt;including errors encountered by the *PSSR itself&lt;/i&gt;. Because of that, a *PSSR should always be coded so that it only runs once during any invocation of the program. It should be written so that the program invocation ends when the *PSSR ends.

It might also be thought that every program should have a *PSSR just because unanticipated errors happen in all systems pretty much every day. Programs should react intelligently when unanticipated errors arise.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>so you specify where the function is to continue processing.</i></p>
<p>That is true, but the values that can be specified are limited. They all refer to specific points in &#8220;Cycle processing&#8221;. There wouldn&#8217;t seem to be an appropriate &#8220;Cycle&#8221; point that handles a particular iteration of a looping structure.</p>
<p>A *PSSR is certainly valid. But it always needs to be remembered that if one exists, it will be called for <i>any error</i> that is not explicitly handled &#8212; <i>including errors encountered by the *PSSR itself</i>. Because of that, a *PSSR should always be coded so that it only runs once during any invocation of the program. It should be written so that the program invocation ends when the *PSSR ends.</p>
<p>It might also be thought that every program should have a *PSSR just because unanticipated errors happen in all systems pretty much every day. Programs should react intelligently when unanticipated errors arise.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: woodengineer</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-direct-program-in-ppsr/#comment-92885</link>
		<dc:creator>woodengineer</dc:creator>
		<pubDate>Thu, 02 Jun 2011 15:52:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-92885</guid>
		<description><![CDATA[Try using MONITOR and ON-ERROR op codes in your loop.  That should allow you to do what you want.  

*PSSR is from the days when the RPG cycle ruled and is rather limited.]]></description>
		<content:encoded><![CDATA[<p>Try using MONITOR and ON-ERROR op codes in your loop.  That should allow you to do what you want.  </p>
<p>*PSSR is from the days when the RPG cycle ruled and is rather limited.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yorkshireman</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-direct-program-in-ppsr/#comment-92867</link>
		<dc:creator>yorkshireman</dc:creator>
		<pubDate>Thu, 02 Jun 2011 08:36:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-92867</guid>
		<description><![CDATA[If you check some manuals - read the RPG manual, say

&lt;i&gt;Any of the RPG IV operation codes can be used in the program exception/error
subroutine. The ENDSR operation must be the last specification for the subroutine,
and the factor 2 entry on the ENDSR operation specifies the return point following
the running of the subroutine. For a discussion of the valid entries for factor 2, see
“File Exception/Error Subroutine (INFSR)” on page 93.&lt;/i&gt;

so you specify where the function is to contunue processing.  
Naturally you will be emitting some sort of message or indication to the joblog, operators, or on a history/incident mechanism before disregarding an error.]]></description>
		<content:encoded><![CDATA[<p>If you check some manuals &#8211; read the RPG manual, say</p>
<p><i>Any of the RPG IV operation codes can be used in the program exception/error<br />
subroutine. The ENDSR operation must be the last specification for the subroutine,<br />
and the factor 2 entry on the ENDSR operation specifies the return point following<br />
the running of the subroutine. For a discussion of the valid entries for factor 2, see<br />
“File Exception/Error Subroutine (INFSR)” on page 93.</i></p>
<p>so you specify where the function is to contunue processing.<br />
Naturally you will be emitting some sort of message or indication to the joblog, operators, or on a history/incident mechanism before disregarding an error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-direct-program-in-ppsr/#comment-92863</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 02 Jun 2011 02:57:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-92863</guid>
		<description><![CDATA[That type of processing should not be done in a *PSSR. Do the error handling where the error occurs. Use the *PSSR for handling errors that are unanticipated.

For example, you might use an error-extender on your operation codes, like UPDATE(E). Then follow the UPDATE(E) statement with IF %ERROR and code your error handling for UPDATE there (or use EXSR to execute an error subroutine for UPDATE). After the error-handling, use ITER to iterate the loop again.

Or wrap the WRITE, UPDATE or DELETE statements in a MONITOR block and code your error-handling in one or more ON-ERROR blocks. You could use ITER to iterate again or do other processing after dropping out of the ON-ERROR block to have the loop iterate normally.

Technically, you could use TAG/GOTO to get back to where the error came from, but you&#039;ll need to know where you came from in that case. For a more detailed discussion, see &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fbooks_web%2Fc092508657.htm&quot;&gt;Detailed RPG IV Object Program Cycle&lt;/a&gt; in the ILE RPG Reference. It can get complicated under various circumstances.

But don&#039;t use a *PSSR for this. Code an appropriate routine as long as you&#039;re going to code a routine anyway.

Note that you might code a *PSSR to work in a generic way. Then you might have a specific error-handler subroutine just for you WRITE, UPDATE or DELETE statements. And the only thing you might have in those specific routines could just be EXSR *PSSR.

By getting into your *PSSR as a normally executed subroutine, none of the usual default handling is done by the system. Your specific subroutines could then return right back to where they were executed from. Further, you could improve those specific subroutines in the future as you learned what you really wanted them to do.

Tom]]></description>
		<content:encoded><![CDATA[<p>That type of processing should not be done in a *PSSR. Do the error handling where the error occurs. Use the *PSSR for handling errors that are unanticipated.</p>
<p>For example, you might use an error-extender on your operation codes, like UPDATE(E). Then follow the UPDATE(E) statement with IF %ERROR and code your error handling for UPDATE there (or use EXSR to execute an error subroutine for UPDATE). After the error-handling, use ITER to iterate the loop again.</p>
<p>Or wrap the WRITE, UPDATE or DELETE statements in a MONITOR block and code your error-handling in one or more ON-ERROR blocks. You could use ITER to iterate again or do other processing after dropping out of the ON-ERROR block to have the loop iterate normally.</p>
<p>Technically, you could use TAG/GOTO to get back to where the error came from, but you&#8217;ll need to know where you came from in that case. For a more detailed discussion, see <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fbooks_web%2Fc092508657.htm">Detailed RPG IV Object Program Cycle</a> in the ILE RPG Reference. It can get complicated under various circumstances.</p>
<p>But don&#8217;t use a *PSSR for this. Code an appropriate routine as long as you&#8217;re going to code a routine anyway.</p>
<p>Note that you might code a *PSSR to work in a generic way. Then you might have a specific error-handler subroutine just for you WRITE, UPDATE or DELETE statements. And the only thing you might have in those specific routines could just be EXSR *PSSR.</p>
<p>By getting into your *PSSR as a normally executed subroutine, none of the usual default handling is done by the system. Your specific subroutines could then return right back to where they were executed from. Further, you could improve those specific subroutines in the future as you learned what you really wanted them to do.</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 6/8 queries in 0.014 seconds using memcached
Object Caching 311/312 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-24 01:30:31 -->