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.
Problem when scheduling a chain.
- philmalmaison
- Nouveau
- Posts: 1148
- Joined: 08 Jun 2007 12:00
- Location: Ile de France
- nicolas_mulot
- Nouveau
- Posts: 149
- Joined: 07 Jan 2010 12:00
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
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