Continuous loop - Loop Activity?

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
RodBarnes
Charter Member
Charter Member
Posts: 182
Joined: Fri Mar 18, 2005 2:10 pm

Continuous loop - Loop Activity?

Post by RodBarnes »

I'm trying to implement some continuous loop logic in a sequence. I have been successful using the Loop Activity but it uses start/step/end values and I really want to just loop until a certain clock time which is trapped by a nested condition within the loop logic.

I can get it to work using very large end values for the counter but wondered if there was a more elegant way to do this; i.e.., a way to have it just loop until a nested condition causes and exit from the loop.

I was not successful creating any kind of loop logic without using the loop activity.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Did you try putting the end value as a negative number?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
RodBarnes
Charter Member
Charter Member
Posts: 182
Joined: Fri Mar 18, 2005 2:10 pm

Post by RodBarnes »

Yes, I tried both a negative end value and a step value of zero. It won't accept either.

The step value cannot be zero. The start value must be less than the end value if the step value is positive, or start must be less than end if the step is negative.
srinivas_dsx
Premium Member
Premium Member
Posts: 7
Joined: Thu Nov 17, 2005 12:00 pm

Post by srinivas_dsx »

RodBarnes wrote:Yes, I tried both a negative end value and a step value of zero. It won't accept either.

The step value cannot be zero. The start value must be less than the end value if the step value is positive, or start must be less than end if the step is negative.
If I understand your issue correctly.....We had a similar situation and the way we handled this is by passing a parameter into the "To" step with the maximum run hours (e.g.: #MaxRunHrs#), whereas "From" and "Step" would be 1 and 1 respectively. Between the start and end loop activity stages we had some more routine activities and nested conditions.

Srinivas
Post Reply