Page 1 of 1

For Loop in sequence

Posted: Wed Jun 25, 2008 7:39 am
by saini
Hi

I am having a for loop in the sequence. The job flow is as follow


Job1--------->Job2--------->LoopStart--------->Job3--------->Job4--------->Job5-------->ExecuteCmdStage--------->LoopEnd--------->Job6

In the ExecuteCmdStage I am checking the checking the wordcount of a file (wc -l abc.txt ) and the trigeer is set that it ExecuteCmdStage.$CommandOutput <> 0 continue loop otherwise Job6 has to execute and Sequence ends.

Currently what is happing the with every iteration its executing job6.
Like when it comes to second iteration and it kick off job3+Job6, job4+job6 like this

PMY000_MainSeq..JobControl (DSWaitForJob): Waiting for job Job3+job6 to finish

After few iteration the sequence abort because the JOb6 is aborted with following error
main_program: ORCHESTRATE step execution terminating due to SIGINT [processmgr/pm.C:143]

According to the constarint job6 has to execute once at the end of the sequence but I am not to figure out why its running with every other job in the loop.

Please suggest.

Thanks!!!

Posted: Wed Jun 25, 2008 5:38 pm
by chucksmith
Somehow, your triggers do not sound right. In DataStage Designer, under Tools, then Options, set your DEFAULT TRIGGER COLORS so you can get a visual clue of their setting based upon their color.

Is their another job6 JobActivity stage on the canvas?

Are the triggers linked correctly on your EndLoop activity?

Posted: Wed Jun 25, 2008 9:14 pm
by ray.wurlod
Do you have a link from your EndLoop activity back to your StartLoop activity? This will be painted with a dot-and-dash line.

Posted: Thu Jun 26, 2008 1:11 am
by shaonli
Please check your script.Sometimes command o/p does not work.It happened with me.You can give use the RETURN_VALUE option of the script in the trigger.

Thanks
Shaonli