 




<?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: SQL connection failure error handling</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/sql-connection-failure-error-handling/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-connection-failure-error-handling/</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/sql-connection-failure-error-handling/#comment-76507</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 27 Apr 2010 01:24:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-76507</guid>
		<description><![CDATA[&lt;i&gt;...a controlling CLP calls and RPGLE program which initiates the SQL session...&lt;/i&gt;

The error is quite possibly being handled in the RPGLE program.

&lt;i&gt;I’ve stripped all MONMSG statements out for test purposes...&lt;/i&gt;

...therefore the CL and its MONMSGs might never see that there was a problem.

&lt;i&gt;...and changed severity on the message identifier in QSQLMSG message file. Job log shows the modified message identifier severity level yet the job does not abend.&lt;/i&gt;

Now for the &quot;bad&quot; news -- a message severity level has practically nothing to do with job termination. The severity level of a message is for your programming to make decisions about. The system work management doesn&#039;t care about it.

&lt;i&gt;Is it only escape message identifiers (excluding diag messages) that are considered for a job to exceed end severity?&lt;/i&gt;

For this discussion, the answer should probably be &quot;Yes.&quot;

That is, the message &lt;i&gt;type&lt;/i&gt; is what&#039;s important here. An *ESCAPE message that isn&#039;t &#039;handled&#039; will eventually percolate up through every program in the current stack. Once it reaches the default handlers for the job, the job will terminate. The &#039;severity&#039; assigned to the message description won&#039;t matter. An *ESCAPE message signals an exception that &lt;i&gt;must&lt;/i&gt; be handled.

A *DIAG (Diagnostic) message can have any severity. As long as no exception is signalled, a *DIAG won&#039;t make any difference.

A SQL error is being signalled when the RPGLE program executes some SQL statement. The error might be ignored or it might cause the RPGLE to come to an end. Of course, if it&#039;s ignored, there will likely be subsequent errors that might also be ignored. Whatever is happening, the RPGLE program is reaching a logic end point without sending any kind of &quot;abnormal termination&quot; signal out to the calling CL. The CL then continues as if nothing is wrong because it has no other knowledge.

The RPGLE will (should) have SQL WHENEVER statements or it will have IF-statements to test the SQLSTATE and/or SQLCODE values that are returned from SQL when SQL statements are executed. The RPGLE should interpret any code to choose whether to continue and how to continue. Errors arising out of a CONNECT might normally be re-sent out of any RPGLE programming as *ESCAPE messages to signal the calling program that something went very wrong.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>&#8230;a controlling CLP calls and RPGLE program which initiates the SQL session&#8230;</i></p>
<p>The error is quite possibly being handled in the RPGLE program.</p>
<p><i>I’ve stripped all MONMSG statements out for test purposes&#8230;</i></p>
<p>&#8230;therefore the CL and its MONMSGs might never see that there was a problem.</p>
<p><i>&#8230;and changed severity on the message identifier in QSQLMSG message file. Job log shows the modified message identifier severity level yet the job does not abend.</i></p>
<p>Now for the &#8220;bad&#8221; news &#8212; a message severity level has practically nothing to do with job termination. The severity level of a message is for your programming to make decisions about. The system work management doesn&#8217;t care about it.</p>
<p><i>Is it only escape message identifiers (excluding diag messages) that are considered for a job to exceed end severity?</i></p>
<p>For this discussion, the answer should probably be &#8220;Yes.&#8221;</p>
<p>That is, the message <i>type</i> is what&#8217;s important here. An *ESCAPE message that isn&#8217;t &#8216;handled&#8217; will eventually percolate up through every program in the current stack. Once it reaches the default handlers for the job, the job will terminate. The &#8216;severity&#8217; assigned to the message description won&#8217;t matter. An *ESCAPE message signals an exception that <i>must</i> be handled.</p>
<p>A *DIAG (Diagnostic) message can have any severity. As long as no exception is signalled, a *DIAG won&#8217;t make any difference.</p>
<p>A SQL error is being signalled when the RPGLE program executes some SQL statement. The error might be ignored or it might cause the RPGLE to come to an end. Of course, if it&#8217;s ignored, there will likely be subsequent errors that might also be ignored. Whatever is happening, the RPGLE program is reaching a logic end point without sending any kind of &#8220;abnormal termination&#8221; signal out to the calling CL. The CL then continues as if nothing is wrong because it has no other knowledge.</p>
<p>The RPGLE will (should) have SQL WHENEVER statements or it will have IF-statements to test the SQLSTATE and/or SQLCODE values that are returned from SQL when SQL statements are executed. The RPGLE should interpret any code to choose whether to continue and how to continue. Errors arising out of a CONNECT might normally be re-sent out of any RPGLE programming as *ESCAPE messages to signal the calling program that something went very wrong.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mrdenny</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-connection-failure-error-handling/#comment-76465</link>
		<dc:creator>mrdenny</dc:creator>
		<pubDate>Sun, 25 Apr 2010 23:43:17 +0000</pubDate>
		<guid isPermaLink="false">#comment-76465</guid>
		<description><![CDATA[What database software are you using, and what version?]]></description>
		<content:encoded><![CDATA[<p>What database software are you using, and what version?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: midranger</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-connection-failure-error-handling/#comment-76461</link>
		<dc:creator>midranger</dc:creator>
		<pubDate>Sun, 25 Apr 2010 18:37:22 +0000</pubDate>
		<guid isPermaLink="false">#comment-76461</guid>
		<description><![CDATA[The job is managed by Robot Scheduler, a controlling CLP calls and RPGLE program which initiates the SQL session.  In our case it is to an Oracle database via the Oracle transparent gateway running on the iSeries.

I&#039;ve stripped all MONMSG statements out for test purposes and changed severity on the message identifier in QSQLMSG message file.  Job log shows the modified message identifier severity level yet the job does not abend.

Is it only escape message identifiers (excluding diag messages) that are considered for a job to exceed end severity?

If this isn&#039;t enough info I will post the code and the joblog for review.

Thanks !]]></description>
		<content:encoded><![CDATA[<p>The job is managed by Robot Scheduler, a controlling CLP calls and RPGLE program which initiates the SQL session.  In our case it is to an Oracle database via the Oracle transparent gateway running on the iSeries.</p>
<p>I&#8217;ve stripped all MONMSG statements out for test purposes and changed severity on the message identifier in QSQLMSG message file.  Job log shows the modified message identifier severity level yet the job does not abend.</p>
<p>Is it only escape message identifiers (excluding diag messages) that are considered for a job to exceed end severity?</p>
<p>If this isn&#8217;t enough info I will post the code and the joblog for review.</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-connection-failure-error-handling/#comment-76422</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Sat, 24 Apr 2010 00:44:30 +0000</pubDate>
		<guid isPermaLink="false">#comment-76422</guid>
		<description><![CDATA[What is the structure of the job? That is, how is it opening the connection? Is this an RPG (COBOL? C?) program doing a CONNECT? Or are there other SQL or database elements involved?

Is this the only error message? If the message is monitored or handled by the programming, then it won&#039;t matter what severity you assign. The message will be &#039;handled&#039; so that the &quot;end job&quot; severity won&#039;t be signaled.

In that case, you&#039;ll need to see what the programming is doing at the point where the error occurs. You&#039;ll also need to be sure if other messages are logged just before this one. A previous message should describe the reason that this message was sent. The reason should help you locate and understand what needs to be changed or fixed.

Tom]]></description>
		<content:encoded><![CDATA[<p>What is the structure of the job? That is, how is it opening the connection? Is this an RPG (COBOL? C?) program doing a CONNECT? Or are there other SQL or database elements involved?</p>
<p>Is this the only error message? If the message is monitored or handled by the programming, then it won&#8217;t matter what severity you assign. The message will be &#8216;handled&#8217; so that the &#8220;end job&#8221; severity won&#8217;t be signaled.</p>
<p>In that case, you&#8217;ll need to see what the programming is doing at the point where the error occurs. You&#8217;ll also need to be sure if other messages are logged just before this one. A previous message should describe the reason that this message was sent. The reason should help you locate and understand what needs to be changed or fixed.</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.027 seconds using memcached
Object Caching 309/315 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-21 23:32:39 -->