Page 1 of 1

Global variable on a sequence loop?

Posted: Fri Dec 09, 2016 8:01 am
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.

Posted: Fri Dec 09, 2016 10:50 am
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.