Problem when scheduling a chain.

All questions about Control-M jobs definitions
Post Reply
User avatar
futre25
Nouveau
Nouveau
Posts: 166
Joined: 11 Aug 2009 12:00

Problem when scheduling a chain.

Post by futre25 » 30 Dec 2009 1:06

Hi,

I have a question and a problem.

I have a job that depends on the completion of other 5 jobs.
The 5 work may end with status 0 and 77 and their completion would be correct.
But the job must be executed when at least finished successfully (status 0) one of the 5 previous works.

Thank you all.

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 30 Dec 2009 1:39

for the 5 first jobs
use the do cond

for the one starting at least when one of the 5 first jobs

use cond with OR

regards
philmalmaison

User avatar
futre25
Nouveau
Nouveau
Posts: 166
Joined: 11 Aug 2009 12:00

Post by futre25 » 30 Dec 2009 1:58

Sorry, but the requirement is the end of the first 5 jobs, and that at least 1 finished with status 0. If I apply your answer, will run the job when finished first with status 0, and is required to complete all.

Sorry for my english badly.
Thanks for your reply.

User avatar
nicolas_mulot
Nouveau
Nouveau
Posts: 149
Joined: 07 Jan 2010 12:00

Post by nicolas_mulot » 07 Jan 2010 11:30

futre25,

If I understand well, the requirement is as follows
1) All predecessors must complete with either RC=0 or RC=77
2) At least one must complete RC=0

The conditions from the 5 preds to the unique successor are individual events which are linked to every single predecessor end.
The statement that "at least one should finish RC0" is a global event common to all preds, represented by one single condition (COND0 in the example).

When a pred finishes RC77, it adds the individual condition to mark that successor might execute
When a pred finishes RC0, it adds the individual condition to mark that successor might execute, AND it marks the event that at least one
pred has finished RC0.

A sample of required parms is supplied below:

JOB1 ON STMT * CODE COMPSTAT=0 DOCOND COND_0 ODAT +
DOCOND JOB1_JOB6 ODAT +
ON STMT * CODE COMPSTAT=77 DOCOND JOB1_JOB6 ODAT +

JOB2 ON STMT * CODE COMPSTAT=0 DOCOND COND_0 ODAT +
DOCOND JOB2_JOB6 ODAT +
ON STMT * CODE COMPSTAT=77 DOCOND JOB2_JOB6 ODAT +

JOB3 ON STMT * CODE COMPSTAT=0 DOCOND COND_0 ODAT +
DOCOND JOB3_JOB6 ODAT +
ON STMT * CODE COMPSTAT=77 DOCOND JOB3_JOB6 ODAT +

JOB4 ON STMT * CODE COMPSTAT=0 DOCOND COND_0 ODAT +
DOCOND JOB4_JOB6 ODAT +
ON STMT * CODE COMPSTAT=77 DOCOND JOB4_JOB6 ODAT +

JOB5 ON STMT * CODE COMPSTAT=0 DOCOND COND_0 ODAT +
DOCOND JOB5_JOB6 ODAT +
ON STMT * CODE COMPSTAT=77 DOCOND JOB5_JOB6 ODAT +

JOB6 IN JOB1_JOB6 ODAT AND
JOB2_JOB6 ODAT AND
JOB3_JOB6 ODAT AND
JOB4_JOB6 ODAT AND
JOB5_JOB6 ODAT AND
COND0 ODAT AND

Note1: First make the test with that, and you will notice that if at least one of the pred finishes green, your successor will run while if all of the preds finish red, it will not
Note2: When your tests are OK, add a DO OK to all ON STMT * CODE COMPSTAT=77, so your jobs finish green even in case of a RC77.
Note3: dont forget to specify "Display Do Conditions (as dotted links)" under tools-->Options-->Links of the GUI
NOTE4: You might use the same condition name CONDEND for all preds, but I prefer one condition per predecessor/successor.

Cheers
Nicolas_mulot

Post Reply