<?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: Commitment control in SQLRPGLE</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/commitment-control-in-sqlrpgle/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/commitment-control-in-sqlrpgle/</link>
	<description></description>
	<lastBuildDate>Thu, 20 Jun 2013 06:31:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/commitment-control-in-sqlrpgle/#comment-93272</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Wed, 15 Jun 2011 10:36:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-93272</guid>
		<description><![CDATA[Were you trying to trap errors in native code Update and Write or Embedded SQL Update and Insert commands?
Phil]]></description>
		<content:encoded><![CDATA[<p>Were you trying to trap errors in native code Update and Write or Embedded SQL Update and Insert commands?<br />
Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/commitment-control-in-sqlrpgle/#comment-93172</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 13 Jun 2011 20:33:55 +0000</pubDate>
		<guid isPermaLink="false">#comment-93172</guid>
		<description><![CDATA[&lt;i&gt;how can I check if any error on update/write…&lt;/i&gt;

Using what language? And running under what operating system version/release?

Using RPG IV on current releases, you might code this way:&lt;pre&gt;
    monitor ;
       update MYFILE ;
    on-error 01221 ;
       callp  MyErrProc( 1 ) ;
    on-error *FILE ;
       callp  MyErrProc( 2 ) ;
    on-error *PROGRAM ;
       callp  MyErrProc( 3 ) ;
    on-error *ALL ;
       callp  MyErrProc( 4 ) ;
    endmon ;&lt;/pre&gt;
That piece of code attempts to run an UPDATE against a file named MYFILE. It monitors for errors in the UPDATE and calls procedures for different possible error conditions. The error handling doesn&#039;t have to be a CALLP -- it can be EXSR, CALL or any series of statements that you want. I showed CALLP for each one with a different parm for different errors.

The first error tested is for file status code 1221, which is &quot;UPDATE before prior READ&quot;. You can have different ON-ERROR sections for any error status codes that you want to handle.

In order to show more details, I included the three &#039;generic&#039; ON-ERROR conditions -- *FILE, *PROGRAM and *ALL.

Any file status codes that are errors would be handled by the *FILE section. Any status codes that are errors but aren&#039;t file status codes would be handled by the *PROGRAM section. The ON-ERROR *ALL section could be used if you didn&#039;t have a *FILE and a *PROGRAM section.

But other languages and versions would do things differently. Even RPG IV has other ways of doing it.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>how can I check if any error on update/write…</i></p>
<p>Using what language? And running under what operating system version/release?</p>
<p>Using RPG IV on current releases, you might code this way:
<pre>
    monitor ;
       update MYFILE ;
    on-error 01221 ;
       callp  MyErrProc( 1 ) ;
    on-error *FILE ;
       callp  MyErrProc( 2 ) ;
    on-error *PROGRAM ;
       callp  MyErrProc( 3 ) ;
    on-error *ALL ;
       callp  MyErrProc( 4 ) ;
    endmon ;</pre>
<p>That piece of code attempts to run an UPDATE against a file named MYFILE. It monitors for errors in the UPDATE and calls procedures for different possible error conditions. The error handling doesn&#8217;t have to be a CALLP &#8212; it can be EXSR, CALL or any series of statements that you want. I showed CALLP for each one with a different parm for different errors.</p>
<p>The first error tested is for file status code 1221, which is &#8220;UPDATE before prior READ&#8221;. You can have different ON-ERROR sections for any error status codes that you want to handle.</p>
<p>In order to show more details, I included the three &#8216;generic&#8217; ON-ERROR conditions &#8212; *FILE, *PROGRAM and *ALL.</p>
<p>Any file status codes that are errors would be handled by the *FILE section. Any status codes that are errors but aren&#8217;t file status codes would be handled by the *PROGRAM section. The ON-ERROR *ALL section could be used if you didn&#8217;t have a *FILE and a *PROGRAM section.</p>
<p>But other languages and versions would do things differently. Even RPG IV has other ways of doing it.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kar</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/commitment-control-in-sqlrpgle/#comment-93146</link>
		<dc:creator>kar</dc:creator>
		<pubDate>Mon, 13 Jun 2011 06:48:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-93146</guid>
		<description><![CDATA[Thanks for the information, 
how can I check if any error on update/write... so that I want to execute some code]]></description>
		<content:encoded><![CDATA[<p>Thanks for the information,<br />
how can I check if any error on update/write&#8230; so that I want to execute some code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: murrayinfosys</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/commitment-control-in-sqlrpgle/#comment-93130</link>
		<dc:creator>murrayinfosys</dc:creator>
		<pubDate>Fri, 10 Jun 2011 23:05:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-93130</guid>
		<description><![CDATA[Commit control can be implemented 2 ways. As Tom suggested or within the RPG program Itself.

When compiling a program:
CRTSQLRPG COMMIT(*HLP)
                       
Commitment control . . . . . . . &gt; *HLP  
                                         
  *CHG                                   
  *ALL                                   
  *CS                                    
  *NONE                                  
  *RR                                    
  *UR                                    
  *RS                                    
  *NC                                    
             
Within the RPG program:
You can use the &quot;SET&quot; statement within the RPG SQL program:

                      Specify SET TRANSACTION Statement                     
                                                                            
Type choices, press Enter.                                                  
                                                                            
  ISOLATION LEVEL . . . . . . . .              1=NO COMMIT (NC, NONE)       
                                               2=READ UNCOMMITTED (UR, CHG) 
                                               3=READ COMMITTED (CS)        
                                               4=REPEATABLE READ (RS, ALL)  
                                               5=SERIALIZABLE (RR)          
                                                                            
WARNING: Journaling must be active.
                      Be aware of the processing overhead.
                      Be aware of other users if this is an active file.]]></description>
		<content:encoded><![CDATA[<p>Commit control can be implemented 2 ways. As Tom suggested or within the RPG program Itself.</p>
<p>When compiling a program:<br />
CRTSQLRPG COMMIT(*HLP)</p>
<p>Commitment control . . . . . . . &gt; *HLP  </p>
<p>  *CHG<br />
  *ALL<br />
  *CS<br />
  *NONE<br />
  *RR<br />
  *UR<br />
  *RS<br />
  *NC                                    </p>
<p>Within the RPG program:<br />
You can use the &#8220;SET&#8221; statement within the RPG SQL program:</p>
<p>                      Specify SET TRANSACTION Statement                     </p>
<p>Type choices, press Enter.                                                  </p>
<p>  ISOLATION LEVEL . . . . . . . .              1=NO COMMIT (NC, NONE)<br />
                                               2=READ UNCOMMITTED (UR, CHG)<br />
                                               3=READ COMMITTED (CS)<br />
                                               4=REPEATABLE READ (RS, ALL)<br />
                                               5=SERIALIZABLE (RR)          </p>
<p>WARNING: Journaling must be active.<br />
                      Be aware of the processing overhead.<br />
                      Be aware of other users if this is an active file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/commitment-control-in-sqlrpgle/#comment-93124</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 10 Jun 2011 20:00:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-93124</guid>
		<description><![CDATA[You might want to investigate the CRTSQLRPGI command COMMIT() parameter (or any CRTSQLxxx command). It may determine if/how commitment control is applied at either the *MODULE or the *PGM object level.

Tom]]></description>
		<content:encoded><![CDATA[<p>You might want to investigate the CRTSQLRPGI command COMMIT() parameter (or any CRTSQLxxx command). It may determine if/how commitment control is applied at either the *MODULE or the *PGM object level.</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/9 queries in 0.014 seconds using memcached
Object Caching 324/327 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-20 07:16:03 -->