Hi Alan -

On Mon, 12 Sep 2011 13:36:53 +0000, Alan Shore <ashore@xxxxxxxx>
wrote:

I have one job that submits numerous (a lot) of submit jobs
Once ALL of them have finished SUCCESSFULLY, I need to submit another one (let's call it PROGRAMLAST)
I was just wondering if anyone else is doing or has done the same thing, what process was used.
I am toying with the idea of using a data area and within each SBMJOB adding 1 to this data area and checking for a particular value in the PROGRAMLAST program
This would mean that PROGRAMLAST would need to be always submitted, but waiting for a value to appear in the data area

I use this method with our End of Day processing. The main job sets
the data area at the very beginning (even though it should already be
zero). The main job increments the data area right before each
SBMJOB. Each secondary job decrements the data area right before it
ends.

Once the main job is done with its main processing, it checks the data
area periodically waiting for it to return to zero.

Note: I increment the data area in the main job rather than at the
beginning of the secondary job in case the job queue is held or
something else were to prevent the data area from getting updated on a
timely basis. I wouldn't want the main job to get a false zero.

Because of object lock issues, each update to the data area is wrapped
in ALCOBJ/DLCOBJ *EXCL WAIT(60) and each check of the data area is
wrapped in ALCOBJ/DLCOBJ *SHRNUP WAIT(60).

Ken
Opinions expressed are my own and do not necessarily represent the views
of my employer or anyone in their right mind.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.