Loop aborts with no message why

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

Loop aborts with no message why

Post by RodBarnes »

Below is a simplified model of the job I began with (wish we could upload a DSX). I removed everything except the loop itself so that it could be demonstrated. Maybe someone is willing to try this and see if they can duplicate the behavior I am seeing -- or explain to me what I am missing as to why it is doing this. :? It is probably something obvious...

What happens when I run this, is that it aborts at iteration #257 with nothing more than the abort message. No indication of the stage that failed or anything else. When it does abort, it doesn't go through either of the nested conditions. I've tried various changes in the conditions and such but nothing seems to make a difference.

StartLoop (Start Loop, numeric): From = 1, Step = 1, To = 500

SetVar (User Variables): Value = @NULL

ChkNull (Nested Condition): Trigger null - IsNull(SetVar.Value), Trigger not_null - Otherwise

ChkZero (Nested Condition): Trigger GT_zero - SetVar.Value > 0, Trigger zero - Otherwise

Next (End Loop)

Continue (Sequence, Any)

Done (Sequence, All)


Vars

Code: Select all

StartLoop @---- Next @-- Continue
    |                      @    @
    |                      |     \
    |                      |    zero
    |                      |       \
    |                     null    ChkZero -- GT_zero -------@ Done
    |                      |       @
    |                      |      /
    |                      |   not_null
    @                      |    /
 SetVar ----------------@ ChkNull
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... loop #257... one past #256... sounds suspiciously like an overflow problem to me. And it is! And there's a patch for it! Woohoo! :wink:

Details here including the eCase number to ask about.
-craig

"You can never have too many knives" -- Logan Nine Fingers
RodBarnes
Charter Member
Charter Member
Posts: 182
Joined: Fri Mar 18, 2005 2:10 pm

Post by RodBarnes »

Thanks, Craig. I noticed that same oddity (256 + 1) because, during earlier testing, I was able to get it to abort at 129 (128 + 1). I'll check out the patch.
chulett wrote:Hmmm... loop #257... one past #256... sounds suspiciously like an overflow problem to me. And it is! And there's a patch for it! Woohoo! :wink:

Details here including the eCase number to ask about.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Only bit of fun with the fix is that it is a client-side patch that affects the code generated when the Sequence is compiled. That means if someone that doesn't have the patch ever compiles the job, it will go right back to being broken.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply