To Run the sequence job in loop

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
sanoojk
Participant
Posts: 36
Joined: Wed Dec 19, 2007 3:54 am

To Run the sequence job in loop

Post by sanoojk »

Hi All
How can i run sequence job in loop. That is as soon as the job finished i want to run it again. I want the job to continue like this from a particular start time to end time.

For example I want to start the job at 9am and it should run in loop till 6PM. As soon as the job finishes it should start running again automatically

Plz help me to solve this


Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Run this sequence from another sequence with its own loop. Exit from that loop when the time reaches/goes past 6PM.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That would be what the Start Loop and End Loop stages would be for.
-craig

"You can never have too many knives" -- Logan Nine Fingers
bijojames
Participant
Posts: 12
Joined: Wed Nov 28, 2007 10:27 pm
Location: THANE

Sequence job

Post by bijojames »

Hi
Actuall I have used the start loop stage and end loop stage. But its doesnot provide the option to run a job in loop within a particular time frame.
If the job take different time to run the job in loop execution, the strategy of implementing the job using the following stages(in order) "UserVariables_Activity"----StartLoop_Activity----Job_Activity---EndLoop_Activity will not work

Please consider this and give a solution
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You just need to add a Routine Activity stage before the End Loop, one that checks for your exit condition (time passed, for example) and branches out of the loop.
-craig

"You can never have too many knives" -- Logan Nine Fingers
bijojames
Participant
Posts: 12
Joined: Wed Nov 28, 2007 10:27 pm
Location: THANE

Post by bijojames »

Hi
This is an extension to my earlier doubt.If each time when we run the job, it takes different time to complete how we can give the counter definition in start loop
Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't need to worry. The outer loop's counter is not used. It just keeps incrementing by 1. Exit from the loop via a transfer to an activity beyond the EndLoop activity once it passes 6pm. Tip: also provide a "file read" or other mechanism for asking the outer loop to terminate prematurely.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply