Looping in Sequencer

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
sonia jacob
Participant
Posts: 122
Joined: Mon Jul 05, 2004 1:33 pm
Location: MA

Looping in Sequencer

Post by sonia jacob »

Hi,

I have 2 jobs, JOB1, JOB2 that need to run sequentially. I have a PROCESS P1 that runs after JOB1 and before JOB2. I need to wait till P1 completes to trigger JOB2. No, P1 is not a DS job.

To know whether P1 has completed, I need to query agaisnt table to check for complete flag.

We have written routine that loops till the status becomes 'Complete'. Once the status is complete I come out of the routine and the next job JOB2 kicks off in the sequencer

Is there any better way to go about it?

Thanks in Advance.

regards,
Sonia
Regards
Sonia Jacob
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It sounds like a good solution and is simple enough to withstand the test of production. If your routine has lengthy SLEEPs to wait and also has a maximum timeout so that it always will exit sometime then you are set.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A job sequence? JOB1 --> P1 --> ExecuteCommand --> JOB2

If P1 is an ExecuteCommand activity in its own right, then it might be wrapped in a script whose exit status can be tested, thereby avoiding the second ExecuteCommand activity.
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