Create a sequencer to run the job in infinite 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
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Create a sequencer to run the job in infinite loop

Post by bkumar103 »

Hi,
I am using datastage 7.5 PX. I have one requirement to run the job continuously in infinite loop. The job is scheduled thru sequencer. Is there any way to run the job indefiintely thru sequencer?


Thansk,
Birendra
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What is the actualy you are trying to perform?
You can schecule for Every X.
Ot Start loop activity and End loop activty (If available) with a condition which will never fail.
Or a script which will wait till the last file to get produced in Unix and kicks off the job again with some time gap.
Last edited by kumar_s on Wed Jul 25, 2007 4:09 am, edited 1 time in total.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Continuously-running jobs are, in general, a bad idea except, perhaps, when exposing your job as a web service via RTI stages (SOA edition). Let the jobs finish at least once per day so resources can be cleaned up. Also provide a mechanism so that you can instruct the job to finish on the next cycle.

Please be far more precise about what you are trying to achieve.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

Hi,
Yes, process will just stop once per day.

Birendra
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

So its continously once per day and through out the year?
If so you can schedule it accordingly.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

But the one run will over in 10 min or so. Hence it is requred to run in a loop to run it continuously.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

What is the funciton of the job?
Was the mentioned approach not helping?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

Hi,
Start loop activity and End loop activty (If available) with a condition which will never fail. Is such thing is possible. What could be the condition for such loop.

My job reads from a MQ. I want a continuous run to read from MQ. The job will stop once per day. I am not able to achieve this thru Webspehere MQ stage hence i thought of trying sequencer.


Birendra
reddy.vinod
Participant
Posts: 36
Joined: Mon Jul 16, 2007 3:37 am
Location: USA

Re: Create a sequencer to run the job in infinite loop

Post by reddy.vinod »

Hi,
i have faced the same problem and overcomed with one method,i.e.
you first take job what u have run infinite time in job activity, next keep that between start and end loop,next in start loop take '1' in from ,take '1' in step and take some large value like '999999999999999999999999999999999999999' in 'to' .next connect end loop activity to one routine activity with that routine u r running one sample job (this sample job is not in the sequence) after the sample job ,in the sample job u r writing after job routine that routine have call this first sequence again,so it will become a infinie loop,but u should use sleep function at the starting of every routine else u will get error.when it go the sequence u have given a large value in "to" of start loop activity.so it will run a long time after that time it go to the sample job again it wil came back

i have tried it u try and get me back if u have any queries...
VINOD
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Re: Create a sequencer to run the job in infinite loop

Post by kumar_s »

reddy.vinod wrote:Hi,
in the sample job u r writing after job routine that routine have call this first sequence again,so it will become a infinie loop...
But, won't the job will wait till the AfterJob Routine is finished?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply