For Loop in sequence

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
saini
Participant
Posts: 18
Joined: Sat Jan 13, 2007 12:01 am

For Loop in sequence

Post 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!!!
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shaonli
Participant
Posts: 80
Joined: Tue Nov 28, 2006 6:52 am

Post 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
Post Reply