Skip to Content
author's profile photo Former Member
Former Member

Trigger a job after all jobs have completed

Hi All.

I have a program which schedules several jobs based on some complex criteria maintained in a config table. Some of the jobs scheduled can be in a chain, some can be independent.

At the end of all these jobs which my program spurned off, I want to run another program which will collect their spools and send it in one shot to a recipient.

How can I know when all my jobs have completed? I know I can look at TBTCO table - but can I trigger the spool sending program automatically based on completion of all jobs?

The point is I do not know which job can complete at the end - otherwise I could have triggered an event from that last job.

Any clues please?

Thanks in adv.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 13, 2010 at 02:18 PM

    No, without a 3rd party product. Since you have jobs without dependencies, your 'automatic' process has to be a polling process for the spawned jobs from the current program or another spawned job.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Aishi,

      There's a simple trick you can apply..There's no need for the third party tools for this.

      Create a custom table with the fields for p_Date(Primary Key) and the fields for each program of the background jobs.

      Update the custom table with the value 'X' after each program is succesfully completed and check for all the fields in the table if they are all updated and if they are all updated then trigger the final batch job with the Event using

      FM "BP_EVENT_RAISE'.

      Hope you understood the logic.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.