I searched the forum and didn't see this particular question, so I hope it's not a too often repeated inquiry!
We have one sequence that runs many sequences (I'll call them subsequences), the subsequences run many jobs. I've got it set up with the trigger conditions so that within the subsequences if one of the jobs fail, it won't continue within that sequence. The job will abort and the subsequence will return to the main sequence with a job status of 1. Is there a way to make the subsequence's job status reflect the highest status of one of the jobs? If not, what is the standard way to handle this type of situation?
Job Status for Embeded Sequence
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you're running 7.5 there is a rich set of expressions you can use in custom triggers. You could use these with the exit status variables of the jobs in the Sequence.
If earlier than 7.5 you're up for a complex web of triggers; all normal exits go through an Any sequencer to the LogEntry routine, all warning exits go through an Any sequencer to the LogWarn routine. I'm assuming that none of your production jobs abort.
The controller can then pick up the exit status of the Sequence; if any job had had a warning, then there will be a warning logged in the Sequence's log, so its exit status will be 2 (finished (see log)).
If earlier than 7.5 you're up for a complex web of triggers; all normal exits go through an Any sequencer to the LogEntry routine, all warning exits go through an Any sequencer to the LogWarn routine. I'm assuming that none of your production jobs abort.
The controller can then pick up the exit status of the Sequence; if any job had had a warning, then there will be a warning logged in the Sequence's log, so its exit status will be 2 (finished (see log)).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Yeah, that's the trouble I'm having. I have a sequence with 3 steps. Sequence 1 followed by Sequence 2 followed by Sequence 3.
Sequence 1 consists of 2 server jobs; say server job a and b.
I don't want sequence 2 to run if server job a has failed. However, when I set up the custom trigger using the rich expression, it doesn't recognize server job a as a jobname, since it is embeded in Sequence 1. All sequence 2 can see is sequence 1, whose return codes are always fine, even if server job a AND b failed.
Sequence 1 consists of 2 server jobs; say server job a and b.
I don't want sequence 2 to run if server job a has failed. However, when I set up the custom trigger using the rich expression, it doesn't recognize server job a as a jobname, since it is embeded in Sequence 1. All sequence 2 can see is sequence 1, whose return codes are always fine, even if server job a AND b failed.
That's why you need to make Sequence 1's return code not fine when any of the jobs have issues. You must have missed this in Ray's post:
By writing a warning to the sequences log when a job fails, your trigger will pick up on that and not continue downstream.ray.wurlod wrote:all warning exits go through an Any sequencer to the LogWarn routine
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The "complex web" I described has to be in Sequence1, handling the exit status of job a and job b.
You don't really need the LogEntry path I described.
You can handle aborts through the same Any sequencer so that a warning is logged.
The main sequence detects the exit status of Sequence 1.
Code: Select all
joba (Warn) ----------> Any1 --------> LogWarn (Routine)
|
jobb (Warn) --------------+
You can handle aborts through the same Any sequencer so that a warning is logged.
The main sequence detects the exit status of Sequence 1.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.