 




<?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: Status of a submitted AS/400 job</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/</link>
	<description></description>
	<lastBuildDate>Sat, 25 May 2013 11:47:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Featured Member: Philpl1jb - ITKE Community Blog</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94438</link>
		<dc:creator>Featured Member: Philpl1jb - ITKE Community Blog</dc:creator>
		<pubDate>Thu, 21 Jul 2011 07:02:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-94438</guid>
		<description><![CDATA[[...] Status of a submitted AS/400 job [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Status of a submitted AS/400 job [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94259</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 15 Jul 2011 18:09:49 +0000</pubDate>
		<guid isPermaLink="false">#comment-94259</guid>
		<description><![CDATA[&lt;i&gt;If I could modify the CL’s...&lt;/i&gt;

That&#039;s true. But since the message queue support doesn&#039;t require modifying the submitted jobs, why do it?

The message queue can hold thousands of messages. The submitted jobs may even send their own status (tracking? debug?) messages if modification is possible. Sending one message doesn&#039;t erase previous messages as would happen with a data area.

And unless the data area is expanded to hold more info that the submitted CL must format and put there, there&#039;s no identification of the source nor the time. A message will automatically include sender identification and timestamp.

So, simply by specifying a message queue on the SBMJOB command, the base actions are all handled automatically by the system. Once the base is in place, it can be expanded for almost any future need.

I would use CRTMSGQ with MSGQFULL(*WRAP) to allow the queue to wrap if there was ever any reason that messages might not be received from it for an extended time.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>If I could modify the CL’s&#8230;</i></p>
<p>That&#8217;s true. But since the message queue support doesn&#8217;t require modifying the submitted jobs, why do it?</p>
<p>The message queue can hold thousands of messages. The submitted jobs may even send their own status (tracking? debug?) messages if modification is possible. Sending one message doesn&#8217;t erase previous messages as would happen with a data area.</p>
<p>And unless the data area is expanded to hold more info that the submitted CL must format and put there, there&#8217;s no identification of the source nor the time. A message will automatically include sender identification and timestamp.</p>
<p>So, simply by specifying a message queue on the SBMJOB command, the base actions are all handled automatically by the system. Once the base is in place, it can be expanded for almost any future need.</p>
<p>I would use CRTMSGQ with MSGQFULL(*WRAP) to allow the queue to wrap if there was ever any reason that messages might not be received from it for an extended time.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94256</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Fri, 15 Jul 2011 14:51:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-94256</guid>
		<description><![CDATA[If I could modify the CL&#039;s then I would co-ordinate this through a data area

When JobA starts it updates the data area with &#039;JOBA STARTING&#039;

The last step JobA updates the data area with &#039;JOBA ENDED SUCCESSFULLY&#039;

The First Step of JobB checks the value in the data area 
    if it contains&#039;JOBA ENDED SUCCESSFULLY&#039; continue with JobB 
    else send message and ??? wait/end???

The second step of JobB updates the data area with &#039;JOBB STARTING&#039;

The last step of JobB updates the data area with &#039;JOBB ENDED SUCCESSFULLY&#039;

The First Step of JobC checks the value in the data area 
    if it contains &#039;JOBB ENDED SUCCESSFULLY&#039; continue with JobC 
   else send message and ??? wait/end???

The second step of JobC updates the data area with &#039;JOBC STARTING&#039;

The last step of JobC updates the data area with &#039;JOBC ENDED SUCCESSFULLY&#039;

Phil]]></description>
		<content:encoded><![CDATA[<p>If I could modify the CL&#8217;s then I would co-ordinate this through a data area</p>
<p>When JobA starts it updates the data area with &#8216;JOBA STARTING&#8217;</p>
<p>The last step JobA updates the data area with &#8216;JOBA ENDED SUCCESSFULLY&#8217;</p>
<p>The First Step of JobB checks the value in the data area<br />
    if it contains&#8217;JOBA ENDED SUCCESSFULLY&#8217; continue with JobB<br />
    else send message and ??? wait/end???</p>
<p>The second step of JobB updates the data area with &#8216;JOBB STARTING&#8217;</p>
<p>The last step of JobB updates the data area with &#8216;JOBB ENDED SUCCESSFULLY&#8217;</p>
<p>The First Step of JobC checks the value in the data area<br />
    if it contains &#8216;JOBB ENDED SUCCESSFULLY&#8217; continue with JobC<br />
   else send message and ??? wait/end???</p>
<p>The second step of JobC updates the data area with &#8216;JOBC STARTING&#8217;</p>
<p>The last step of JobC updates the data area with &#8216;JOBC ENDED SUCCESSFULLY&#8217;</p>
<p>Phil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94245</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 15 Jul 2011 01:37:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-94245</guid>
		<description><![CDATA[&lt;i&gt;Can I use a RTVJOBA to check whether job A has finished...&lt;/i&gt;

No.

RTVJOBA can only be used by a job to find out things about itself. It can&#039;t be used to find out about any other job.

The simplest way to find the status of a submitted job is by calling the &lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqwcrjbst.htm&quot;&gt;Retrieve Job Status (QWCRJBST) API&lt;/a&gt;. But that will only tell you if the job has finished; it won&#039;t tell you if it was a successful completion.

And in order to call that API, you will need to know enough to identify which job the API should return status for. When your program submitted the other job, a CPC1221completion message was sent to your program&#039;s message queue. You can use the RCVMSG command to receive that message and then extract the fully qwualified job name from the message data.

You&#039;ll need to use that message data for just about any function that will return status information about a job that you submitted.

One function that you won&#039;t need to use that message data for is if you simply receive messages from the message queue that you specify in the SBMJOB MSGQ() parameter. Sufficient status information will simply appear in the message queue as soon as its available from the system -- assuming that all you need to know is whether the job is finished yet and whether it failed or not.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>Can I use a RTVJOBA to check whether job A has finished&#8230;</i></p>
<p>No.</p>
<p>RTVJOBA can only be used by a job to find out things about itself. It can&#8217;t be used to find out about any other job.</p>
<p>The simplest way to find the status of a submitted job is by calling the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqwcrjbst.htm">Retrieve Job Status (QWCRJBST) API</a>. But that will only tell you if the job has finished; it won&#8217;t tell you if it was a successful completion.</p>
<p>And in order to call that API, you will need to know enough to identify which job the API should return status for. When your program submitted the other job, a CPC1221completion message was sent to your program&#8217;s message queue. You can use the RCVMSG command to receive that message and then extract the fully qwualified job name from the message data.</p>
<p>You&#8217;ll need to use that message data for just about any function that will return status information about a job that you submitted.</p>
<p>One function that you won&#8217;t need to use that message data for is if you simply receive messages from the message queue that you specify in the SBMJOB MSGQ() parameter. Sufficient status information will simply appear in the message queue as soon as its available from the system &#8212; assuming that all you need to know is whether the job is finished yet and whether it failed or not.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: danthedane</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94225</link>
		<dc:creator>danthedane</dc:creator>
		<pubDate>Thu, 14 Jul 2011 13:50:20 +0000</pubDate>
		<guid isPermaLink="false">#comment-94225</guid>
		<description><![CDATA[You may find your solution in my answer to RBDSILVA in an old Q dated aug 19., 2009:

http://itknowledgeexchange.techtarget.com/itanswers/cl400-with-restart-option/ 

Happy Coding
DanF]]></description>
		<content:encoded><![CDATA[<p>You may find your solution in my answer to RBDSILVA in an old Q dated aug 19., 2009:</p>
<p><a href="http://itknowledgeexchange.techtarget.com/itanswers/cl400-with-restart-option/" rel="nofollow">http://itknowledgeexchange.techtarget.com/itanswers/cl400-with-restart-option/</a> </p>
<p>Happy Coding<br />
DanF</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pdraebel</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94216</link>
		<dc:creator>pdraebel</dc:creator>
		<pubDate>Thu, 14 Jul 2011 08:00:21 +0000</pubDate>
		<guid isPermaLink="false">#comment-94216</guid>
		<description><![CDATA[Submitting the jobs at one time to a single threaded Jobq will work, but not if you want to make sure the job completes successfully. Tom&#039;s sugeestion might open more options for that puurpose.]]></description>
		<content:encoded><![CDATA[<p>Submitting the jobs at one time to a single threaded Jobq will work, but not if you want to make sure the job completes successfully. Tom&#8217;s sugeestion might open more options for that puurpose.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iiiiiiiiiiiii</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94177</link>
		<dc:creator>iiiiiiiiiiiii</dc:creator>
		<pubDate>Wed, 13 Jul 2011 05:47:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-94177</guid>
		<description><![CDATA[write a cl program...first call program A and then call program B and then call program C.
So after completion of Program A only program B will execute and so on.

I hope u got my answer.

Thanks
priya]]></description>
		<content:encoded><![CDATA[<p>write a cl program&#8230;first call program A and then call program B and then call program C.<br />
So after completion of Program A only program B will execute and so on.</p>
<p>I hope u got my answer.</p>
<p>Thanks<br />
priya</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: runelf</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94171</link>
		<dc:creator>runelf</dc:creator>
		<pubDate>Tue, 12 Jul 2011 21:59:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-94171</guid>
		<description><![CDATA[You could submit Job A, then Job B then Job C from one CL and us a single threaded JOBQ.  The second job will not go active until the first has completed, and the same for the third.]]></description>
		<content:encoded><![CDATA[<p>You could submit Job A, then Job B then Job C from one CL and us a single threaded JOBQ.  The second job will not go active until the first has completed, and the same for the third.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94162</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Tue, 12 Jul 2011 19:16:01 +0000</pubDate>
		<guid isPermaLink="false">#comment-94162</guid>
		<description><![CDATA[The SBMJOB MSGQ() parameter has this help text:&lt;ul&gt;
	&lt;li&gt;Specifies the message queue to which a completion message is sent when the submitted job has completed running, either normally or abnormally. If an abnormal ending occurs, the help information for the completion  message specifies the possible causes.&lt;/li&gt;
&lt;/ul&gt;
The purpose of that parameter is so that the submitting job can monitor the submitted job and be notified when the job completes, and be notified about some conditions of the completion.

If you want JobA to submit JobB and to know when JobB completes, then submit JobB with a message queue specified. After the SBMJOB command completes, just have JobA wait for a completion message to arrive at the specified message queue.

Create a simple message queue in the application library and name it MONJOBB, or whatever name makes sense. Use that message queue just for this purpose.

Tom]]></description>
		<content:encoded><![CDATA[<p>The SBMJOB MSGQ() parameter has this help text:
<ul>
<li>Specifies the message queue to which a completion message is sent when the submitted job has completed running, either normally or abnormally. If an abnormal ending occurs, the help information for the completion  message specifies the possible causes.</li>
</ul>
<p>The purpose of that parameter is so that the submitting job can monitor the submitted job and be notified when the job completes, and be notified about some conditions of the completion.</p>
<p>If you want JobA to submit JobB and to know when JobB completes, then submit JobB with a message queue specified. After the SBMJOB command completes, just have JobA wait for a completion message to arrive at the specified message queue.</p>
<p>Create a simple message queue in the application library and name it MONJOBB, or whatever name makes sense. Use that message queue just for this purpose.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ramvishakramesh</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/status-of-a-submitted-job/#comment-94142</link>
		<dc:creator>ramvishakramesh</dc:creator>
		<pubDate>Tue, 12 Jul 2011 08:46:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-94142</guid>
		<description><![CDATA[Thanks for the reply, but my aim is to handle it from CL program itself. I cannot depend on WRKSMBJOB in that case right? In my CL program, I am doing SBMJOB to submit job A, Once A is sussessfully completed, then only I need to submit B and so on. How to do that from  program?]]></description>
		<content:encoded><![CDATA[<p>Thanks for the reply, but my aim is to handle it from CL program itself. I cannot depend on WRKSMBJOB in that case right? In my CL program, I am doing SBMJOB to submit job A, Once A is sussessfully completed, then only I need to submit B and so on. How to do that from  program?</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-25 12:06:24 -->