Global variable on a sequence loop?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
MrBlack
Participant
Posts: 125
Joined: Wed Aug 08, 2012 8:57 am

Global variable on a sequence loop?

Post by MrBlack »

When looping on a sequence canvas, is it possible to interact with a variable outside of the loop?

Inside of my loop, I have Path A and Path B. If the during the execution of the loop I end up going down Path B 3 times, I want to send myself an email because going down Path B a couple of times is ok, but if I start going down that way too many times I want to notify myself.

If I was working in another language I would be able to have a variable external to the loop and be able to interact with it. I don't know how to do this within datastage.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

You should be able to see the loop counter as an Activity variable on the start loop stage. You can use a nested condition to test that variable with a trigger that goes to a notify stage that sends email when the loop counter exceeds a certain value.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply