 




<?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: When submitting a procedure via CL program, i do not get any abnormal end message.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 19:50:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: nullfields</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-74608</link>
		<dc:creator>nullfields</dc:creator>
		<pubDate>Mon, 08 Mar 2010 14:46:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-74608</guid>
		<description><![CDATA[Almost forgot....

You can store your queries in a source member (length of source area=79, total record length 91).  Then use the command CRTQMQRY to generate the executable query object (*QMQRY).]]></description>
		<content:encoded><![CDATA[<p>Almost forgot&#8230;.</p>
<p>You can store your queries in a source member (length of source area=79, total record length 91).  Then use the command CRTQMQRY to generate the executable query object (*QMQRY).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nullfields</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-74605</link>
		<dc:creator>nullfields</dc:creator>
		<pubDate>Mon, 08 Mar 2010 14:24:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-74605</guid>
		<description><![CDATA[It seems to me that building a stored procedure to generate a program that is then called directly is a long way around to solving a problem.  Is it that the only languages you are familiar with are CL and SQL?  It&#039;s interesting, but limiting (like handling of input/output parameter types that CL does not have a defintion for).

To work with QMQRY, use the menu STRQM, then option 1 to get into generating a query.  Option 10 to change your user options. 

Once a query is defined, you can execute it from a CLP using the command STRQMQRY.  The command has options to pass in variables to make it a little more dynamic.

So, you would probably have two QMQRY&#039;s.  The first would define the procedure.  That one would contain the CREATE PROCEDURE statement you used to generate the *PGM object.  That would only need to be done to save the source of the procedure better than your options with STRSQL.

The second would contain the CALL PROCEDURE statement that would be equivalent to executing the procedure from within STRSQL.]]></description>
		<content:encoded><![CDATA[<p>It seems to me that building a stored procedure to generate a program that is then called directly is a long way around to solving a problem.  Is it that the only languages you are familiar with are CL and SQL?  It&#8217;s interesting, but limiting (like handling of input/output parameter types that CL does not have a defintion for).</p>
<p>To work with QMQRY, use the menu STRQM, then option 1 to get into generating a query.  Option 10 to change your user options. </p>
<p>Once a query is defined, you can execute it from a CLP using the command STRQMQRY.  The command has options to pass in variables to make it a little more dynamic.</p>
<p>So, you would probably have two QMQRY&#8217;s.  The first would define the procedure.  That one would contain the CREATE PROCEDURE statement you used to generate the *PGM object.  That would only need to be done to save the source of the procedure better than your options with STRSQL.</p>
<p>The second would contain the CALL PROCEDURE statement that would be equivalent to executing the procedure from within STRSQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnsonmumbai</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-74596</link>
		<dc:creator>johnsonmumbai</dc:creator>
		<pubDate>Mon, 08 Mar 2010 11:38:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-74596</guid>
		<description><![CDATA[Hi Tom,

Tried strmqmqry, however was able to find how to store the output of the sql.

Can you give us a sample QMQRY.

Await your reply.
Johnson]]></description>
		<content:encoded><![CDATA[<p>Hi Tom,</p>
<p>Tried strmqmqry, however was able to find how to store the output of the sql.</p>
<p>Can you give us a sample QMQRY.</p>
<p>Await your reply.<br />
Johnson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-74308</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 26 Feb 2010 01:50:14 +0000</pubDate>
		<guid isPermaLink="false">#comment-74308</guid>
		<description><![CDATA[re Flame&#039;s updated answer...

When I originally replied to that forum a couple years ago, it was about a slightly different problem. However, that thread does indeed contain a possible useful item -- using a QM query to issue the CALL.

Since a QM query provides a mostly valid SQL environment, it might help in returning and recording SQL status info as messages in the joblog.

And that&#039;s apparently the crux of &lt;i&gt;this question&lt;/i&gt;.

Calling the proc directly from CL potentially loses SQL status info. But issuing STRQMQRY to CALL the proc might be a nicely valid answer here.

Nice catch!

Tom]]></description>
		<content:encoded><![CDATA[<p>re Flame&#8217;s updated answer&#8230;</p>
<p>When I originally replied to that forum a couple years ago, it was about a slightly different problem. However, that thread does indeed contain a possible useful item &#8212; using a QM query to issue the CALL.</p>
<p>Since a QM query provides a mostly valid SQL environment, it might help in returning and recording SQL status info as messages in the joblog.</p>
<p>And that&#8217;s apparently the crux of <i>this question</i>.</p>
<p>Calling the proc directly from CL potentially loses SQL status info. But issuing STRQMQRY to CALL the proc might be a nicely valid answer here.</p>
<p>Nice catch!</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-73043</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 26 Jan 2010 22:40:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-73043</guid>
		<description><![CDATA[Because SQL procedures are created as *PGM objects, they are &lt;i&gt;technically&lt;/i&gt; capable of being executed with a CL CALL command. However, in doing so, they are being run outside of the SQL environment. You&#039;re going to need a serious DB2 SQL developer to determine where any results might end up.

If your procedures need to return SQL status information, there is no active SQL environment to receive it. Status info would simply be lost in my view of things.

Wrap your SQL procedures inside of SQL CLI calls or call them from programs compiled with embedded SQL. I can&#039;t think of any other possibilities for tracking whatever is happening. If you don&#039;t have the SQL Development Kit to allow compiling HLL SQL programs, you can still code for SQL CLI or issue SQL CALL statements in REXX. (But REXX SQL CALL statements don&#039;t support host variables.)

I&#039;d love to see someone else provide a better answer. Only thing I can suggest is to call the procedures properly if you want proper results.

Tom]]></description>
		<content:encoded><![CDATA[<p>Because SQL procedures are created as *PGM objects, they are <i>technically</i> capable of being executed with a CL CALL command. However, in doing so, they are being run outside of the SQL environment. You&#8217;re going to need a serious DB2 SQL developer to determine where any results might end up.</p>
<p>If your procedures need to return SQL status information, there is no active SQL environment to receive it. Status info would simply be lost in my view of things.</p>
<p>Wrap your SQL procedures inside of SQL CLI calls or call them from programs compiled with embedded SQL. I can&#8217;t think of any other possibilities for tracking whatever is happening. If you don&#8217;t have the SQL Development Kit to allow compiling HLL SQL programs, you can still code for SQL CLI or issue SQL CALL statements in REXX. (But REXX SQL CALL statements don&#8217;t support host variables.)</p>
<p>I&#8217;d love to see someone else provide a better answer. Only thing I can suggest is to call the procedures properly if you want proper results.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnsonmumbai</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-72775</link>
		<dc:creator>johnsonmumbai</dc:creator>
		<pubDate>Tue, 19 Jan 2010 04:43:06 +0000</pubDate>
		<guid isPermaLink="false">#comment-72775</guid>
		<description><![CDATA[We have been submitting the CLE pgm by calling it in a CL program, it work fine, only issue as mentioned is when the CLE pgm fails there is no log generated.

From what i understand from you if i call the CLE pgm from an RPG pgm and if there is an error in the CLE pgm i should be able to get a joblog informing of the error.?

Please confirm.]]></description>
		<content:encoded><![CDATA[<p>We have been submitting the CLE pgm by calling it in a CL program, it work fine, only issue as mentioned is when the CLE pgm fails there is no log generated.</p>
<p>From what i understand from you if i call the CLE pgm from an RPG pgm and if there is an error in the CLE pgm i should be able to get a joblog informing of the error.?</p>
<p>Please confirm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-72766</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Mon, 18 Jan 2010 21:42:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-72766</guid>
		<description><![CDATA[&lt;i&gt;The procedure is saved as a program object with CLE attribute.

This program object is then called by a CL program. &lt;/i&gt;

AFAIK, the resulting CLE program object cannot be directly called successfully from a CL program. It could only be called from a SQL program that was compiled with embedded SQL to run the SQL CALL statement.

You can&#039;t use the CL CALL command for this. There are parts that need to be built into the program by the SQL pre-compiler in order to support the SQL CALL statement properly. There is no SQL pre-compiler for CL.

Your CLE procedure will need to be called from RPG, COBOL, C or another HLL that has SQL compiler support.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>The procedure is saved as a program object with CLE attribute.</p>
<p>This program object is then called by a CL program. </i></p>
<p>AFAIK, the resulting CLE program object cannot be directly called successfully from a CL program. It could only be called from a SQL program that was compiled with embedded SQL to run the SQL CALL statement.</p>
<p>You can&#8217;t use the CL CALL command for this. There are parts that need to be built into the program by the SQL pre-compiler in order to support the SQL CALL statement properly. There is no SQL pre-compiler for CL.</p>
<p>Your CLE procedure will need to be called from RPG, COBOL, C or another HLL that has SQL compiler support.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnsonmumbai</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-72696</link>
		<dc:creator>johnsonmumbai</dc:creator>
		<pubDate>Fri, 15 Jan 2010 07:02:13 +0000</pubDate>
		<guid isPermaLink="false">#comment-72696</guid>
		<description><![CDATA[The sql procedure is created by using the strsql command and thereafter using the create procedure command within the sql session and thereafer the sql commands that need to be executed are entered within the procedure.

The procedure is saved as a program object with CLE attribute.

This program object is then called by a CL program.   I guess you are right the programmer who has written the sql commands needs to log the errors if any within the sql procedure.]]></description>
		<content:encoded><![CDATA[<p>The sql procedure is created by using the strsql command and thereafter using the create procedure command within the sql session and thereafer the sql commands that need to be executed are entered within the procedure.</p>
<p>The procedure is saved as a program object with CLE attribute.</p>
<p>This program object is then called by a CL program.   I guess you are right the programmer who has written the sql commands needs to log the errors if any within the sql procedure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-72613</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Wed, 13 Jan 2010 23:19:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-72613</guid>
		<description><![CDATA[&lt;i&gt;The CL is actually submitting multiple SQL procedures...&lt;/i&gt;

CL can&#039;t &quot;submit&quot; procedures. CL can only submit programs. And CL has no support for SQL procedures, even interactively -- a HLL program must be called to execute SQL procedures (with exceptions for complex SQL CLI coding in V5R4 and above). Maybe there is confusion over some of the terms.

Therefore, the only reasonable interpretation is that your CL is calling (or submitting) a program that has embedded SQL. The embedded SQL may issue a SQL CALL to a SQL stored procedure.

If the CL calls the program, then any errors should be shown in the joblog of the job that runs the CL. If the CL submits the call to the program, then any errors should be shown in the joblog of the submitted job.

If no errors are found in the job that runs the program, then you need to ask the programmer why he or she did not log errors in the joblog. The programmer is the only one who can explain why there was no coding to log errors. It seems that you are simply calling a program that needs to be changed to include better logging.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>The CL is actually submitting multiple SQL procedures&#8230;</i></p>
<p>CL can&#8217;t &#8220;submit&#8221; procedures. CL can only submit programs. And CL has no support for SQL procedures, even interactively &#8212; a HLL program must be called to execute SQL procedures (with exceptions for complex SQL CLI coding in V5R4 and above). Maybe there is confusion over some of the terms.</p>
<p>Therefore, the only reasonable interpretation is that your CL is calling (or submitting) a program that has embedded SQL. The embedded SQL may issue a SQL CALL to a SQL stored procedure.</p>
<p>If the CL calls the program, then any errors should be shown in the joblog of the job that runs the CL. If the CL submits the call to the program, then any errors should be shown in the joblog of the submitted job.</p>
<p>If no errors are found in the job that runs the program, then you need to ask the programmer why he or she did not log errors in the joblog. The programmer is the only one who can explain why there was no coding to log errors. It seems that you are simply calling a program that needs to be changed to include better logging.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johnsonmumbai</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-submitting-a-procedure-via-cl-program-i-do-not-get-any-abnormal-end-message/#comment-72566</link>
		<dc:creator>johnsonmumbai</dc:creator>
		<pubDate>Wed, 13 Jan 2010 10:18:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-72566</guid>
		<description><![CDATA[The CL is actually submitting multiple SQL procedures, which updates a sequence of files one by one, after each update a log file is updated indicating the update has completed, whenever there is a failure the complete sequence of update is not completed in the log file and is stopped midway is when we realise the sql procedure submitted has ended abnormally.]]></description>
		<content:encoded><![CDATA[<p>The CL is actually submitting multiple SQL procedures, which updates a sequence of files one by one, after each update a log file is updated indicating the update has completed, whenever there is a failure the complete sequence of update is not completed in the log file and is stopped midway is when we realise the sql procedure submitted has ended abnormally.</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.012 seconds using memcached
Object Caching 394/397 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-24 23:00:35 -->