Sequencer issue in PX

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsproj2003
Participant
Posts: 21
Joined: Wed Oct 01, 2003 11:53 am

Sequencer issue in PX

Post by dsproj2003 »

PX 6.0:-
We prepared a sequencer which internal calls 5 PX jobs. Whenever a job is complete status other "warning" and "ok" we stop calling next jobs from that sequence. This works fine.

There are such 4 sequencers in all. All these 4 sequencers are called from a main sequencer. Now we found out in Main sequencer, when first sequencer is running if any jobs refereed in that first sequencer fails next jobs from that first sequencer are not called, But first sequencer is completed with status "OK" and sequencer 2 is called. We do not want any of the following sequencers to be called if any of the internal jobs fails.

Any pointers to this are most welcome.

Thanks,
Nitin
MAT
Participant
Posts: 65
Joined: Wed Mar 05, 2003 8:44 am
Location: Montréal, Canada

Post by MAT »

Hi,

We had a similar problem some time ago. If I understand your problem: Your sequencer finishes fine (status = OK) even if a job inside aborts. This is normal because the sequencer is not affected by the ending status of included jobs. What we did was use a routine after each sequencer to scan the sequencer's logs looking for indication of a failed job. If a job has failed, we log a fatal entry into the main sequencer. This stops the execution of the sequencer running your lower sequences.

I don't know if this it what you are looking for but I could tell you more if you want more specific details.

Mat
dsproj2003
Participant
Posts: 21
Joined: Wed Oct 01, 2003 11:53 am

Post by dsproj2003 »

Hi Mat,

Thanks for your reply.

Bingo!
You got our problem right.

Could you pls give the further details on the resolution for this.
Also would you like to share the subroutines you used for this purpose.

Thanks.
Regards,
Nitin
MAT
Participant
Posts: 65
Joined: Wed Mar 05, 2003 8:44 am
Location: Montréal, Canada

Post by MAT »

Hi Nitin,

Here's how we run our sequences:
1. We build a first sequencer with the jobs we want to run.
2. We make another sequencer containing only two routines. the first one runs the sequencer #1 (setting the parameters, gathering stats, etc.) The second one waits for the first sequencer to end and then scans it's log for warnings and aborts in infos entries about jobs. If it encountered any aborted stauts, it will log a fatal entry into the master sequence to stop it.

DataStage Basic provides you with every DS functions you need for this.

If you want, write me in private and I will send you a couple of routines. The comments inside are in french but the code should be clear enough. It might even save you a couple days of coding ;)

Regards

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

Post by ray.wurlod »

Check out the help on DSAttachJob function. By default, in job sequences, this is set so as not to propagate back to controlling jobs when a controlled job fails. You can change the second argument so that it does.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply