Start Loop --> Nested Condition --> End Loop Limitatio

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Start Loop --> Nested Condition --> End Loop Limitatio

Post by palmeal »

I have a start loop that has a comma separated list of data passed into it. Within this start loops are various job activities before an end loop completes the loop.
I want to add in a Nested Condition Activity after one of the stages within the loop. I have added this in and have two output streams. The problem that I'm having is that only one of the streams can connect into the End Loop as they only support one input link. Adding another End Loop and trying to link that back to the Start Loop isn't allowed either.
So if the run of the Job sequence follows the stream that has a complete loop then all of the values in the loop will be processed through but if the other stream is executed then I can see no way of getting back to the start loop and executing through the next value in the list.

How do I get around this ?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Use a 'sequence' stage with 'any' option to link the conditional branches back to the end-loop stage.
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

Thanks for the quick reply but I don't understand what you mean by
Use a 'sequence' stage with 'any' option
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Use a 'sequence' stage to link all the output links from your conditional logic and pass the output from the sequence stage into the end-loop.

Select 'any' as the sequence method so it will pass through even if one of the link returns any value.
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

Thanks for that - added the Sequencer Stage and it works a treat.
Post Reply