Sequencer ALL or Any - I need both
Moderators: chulett, rschirm, roy
Sequencer ALL or Any - I need both
Hi there,
I am testing a DataStage Sequence - it has branching in it - I am using a Nested Condition - that runs 3 possible out links - sometimes only one will run, sometimes 2, sometimes all 3 - depending on dates and other parameters passed into the Nested Condition my problem is that it runs fine with a Sequencer set to all ONLY if all three links fire up .... if only 1 or 2 fire up the Sequence fails on Sequencer never being exited ....it runs with Sequencer set to Any and handles one link . but if more than one link fires up - then the Sequencer will pass control to the next job once any one of the links finish - which means the 2 other links are still running when control is passed to next job in sequence - not what I wanted .... is there away to 'collect' all 3 links - when any or all of those 3 links have fired up and finished before passing control to the next job ... ?.
I am testing a DataStage Sequence - it has branching in it - I am using a Nested Condition - that runs 3 possible out links - sometimes only one will run, sometimes 2, sometimes all 3 - depending on dates and other parameters passed into the Nested Condition my problem is that it runs fine with a Sequencer set to all ONLY if all three links fire up .... if only 1 or 2 fire up the Sequence fails on Sequencer never being exited ....it runs with Sequencer set to Any and handles one link . but if more than one link fires up - then the Sequencer will pass control to the next job once any one of the links finish - which means the 2 other links are still running when control is passed to next job in sequence - not what I wanted .... is there away to 'collect' all 3 links - when any or all of those 3 links have fired up and finished before passing control to the next job ... ?.
YUM
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's a difficult question. Theoretically all triggers in a Nested Condition will fire very close to simultaneously, so the combination of jobs will start at very close to the same time.
You could use a Routine to determine which jobs are running and wait for all of those (and only those) to finish. This could sit downstream of an Any sequencer.
You could use a Routine to determine which jobs are running and wait for all of those (and only those) to finish. This could sit downstream of an Any sequencer.
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.
Cool Thanks Ray - I was thinking User Varibles - but this is much simplier - do you have examples of this type of coding? - I am guessing Innovocation ID and Job Status - as you said - check on the three possible streams after exiting the Any Sequencer - with a wait type loop on those jobs running
YUM
Just wanted to make sure you were aware of the Reply to Topic 'button' in the future - it is down at the bottom left-hand side of the page. There's no need to quote an entire post simply to reply - do that when it makes sense or you need to respond to certain segments of other posts, but not all the time please.
I 'fixed' your current posts in this thread, in case you are wondering what might have happened.
I 'fixed' your current posts in this thread, in case you are wondering what might have happened.
-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:
I thought (briefly) about that (in terms of binary logic using Sequencers as AND and OR gates) and could not devise a solution. Let us know if you manage to do so.moose2079 wrote:Ray - what about a sub sequence - that gets passed the current Nested Condition triggers - to run a Nest_Condition within the Sub sequence - when any or all jobs finish in the sub Sequence it returns to the calling Sequence - no routine necessary - will test and advise results
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
(Optional) Wait a small interval so all jobs can achieve running status.moose2079 wrote:Cool Thanks Ray - I was thinking User Varibles - but this is much simplier - do you have examples of this type of coding? - I am guessing Innovocation ID and Job Status - as you said - check on the three possible streams after exiting the Any Sequencer - with a wait type loop on those jobs running
Input argument is delimited list of job names.
1. Attach to each of those jobs.
2. Determine status - build list of running jobs, detach from the others.
3. Execute DSWaitForJob in a loop until none of the jobs has a status of running.
4. Detach from each of the jobs initially determined as running.
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.
How about updating the design like this :-
nested_cond ----> 3 o/p links(Each o/p link is having sequencer with ALL mode)
Then one o/p link from 3 sequncers to a single sequencer(with ANY mode) followed by your next job activity stage.
the overall design looks like this
nested cond ----> 3 seqncers ----> 1 sequencer ----> job activity
Datastage experts please correct me if i'm wrong...
nested_cond ----> 3 o/p links(Each o/p link is having sequencer with ALL mode)
Then one o/p link from 3 sequncers to a single sequencer(with ANY mode) followed by your next job activity stage.
the overall design looks like this
nested cond ----> 3 seqncers ----> 1 sequencer ----> job activity
Datastage experts please correct me if i'm wrong...
IBM Certified - Information Server 8.1
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yep the solution was to 'nest' a sub sequence - ie branch to the same sub sequence - but pass a different set of parameter settingsNagin wrote:YUM,
Did you ever find a solution for this? If so, can you please let me know?
I am facing the same exact problem. I can do this in a shell script but I am concerned about losing the parallelism.
I appreciate your help.
YUM
Here is the approach I have now
Seq1, Seq2 and Seq3 get kicked off from the NestCondition and after the completion of ANY or ALL of them JobAct3 and JA4 should get kicked off.
And, the some times only Seq1 may run but not the others and vice versa.
So, you are saying take the NestCondition and put it inside each of Seq1, Seq2 and Seq3 to make it work?
Code: Select all
JobAct1-----> JobAct2-----> NestCondition -----> Seq1
Seq2 -->JobAct3-->JA4
Seq3
And, the some times only Seq1 may run but not the others and vice versa.
So, you are saying take the NestCondition and put it inside each of Seq1, Seq2 and Seq3 to make it work?