Sequencer job

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
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Sequencer job

Post by monaz »

Hi All,

Can anyone please guide me
How can i achieve the below senario's

1. how to handle the sequencer job if it finishes with the warning in that case it should Abort the job.

2. If we have Sequencer job which runs 5 jobs together , incase if 4th job aborts then we need our sequencer to re-run only 4th job, instead of starting from the beginning.
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

(1) Write a after job sub routine to capture the status of the job sequence. Call dsjobfatal() iff the job sequence is finished with warnings. This will abort your job.

(2) In the job sequence properties, enable the check boxes "Add check points so that sequence is re-startable".

HTH
Arvind
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Post by monaz »

arvind_ds wrote:(1) Write a after job sub routine to capture the status of the job sequence. Call dsjobfatal() iff the job sequence is finished with warnings. This will abort your job.

(2) In the job sequence properties, enable the check boxes "Add check points so that sequence is re-startable".

HTH
Thanks Arvind alot

But i dont have an option in job activity stage "Add check points so that sequence is re-startable".

Only this option is present in job properties . Can you please guide me how to get that option in every job activity stage...
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Post by monaz »

arvind_ds wrote:(1) Write a after job sub routine to capture the status of the job sequence. Call dsjobfatal() iff the job sequence is finished with warnings. This will abort your job.

(2) In the job sequence properties, enable the check boxes "Add check points so that sequence is re-startable".

HTH
Can you also please guide me how to write to use dsjobfatal()... i have never written such kind of senario's ...

Will appreciate your quick response
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

You have to enable the "Add checkpoint .....sequence is restartable ..." check box in the properties of the job sequence only. This job sequence in turn will call other 5 jobs as mentioned by you in your previous post. In all these job activities, include the execution action = Rest if required then run.

Note that you don't have to bother about "Add Checkpoint..." in underlying individual job activities.

The second thing is that in the routine you need to call DSLogFatal() to abort the sequence in case it finishes with warnings. You can write after job routines using DS Manager.

HTH
Arvind
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

monaz wrote:
arvind_ds wrote:(1) Write a after job sub routine to capture the status of the job sequence. Call dsjobfatal() iff the job sequence is finished with warnings. This will abort your job.

(2) In the job sequence properties, enable the check boxes "Add check points so that sequence is re-startable".

HTH
Can you also please guide me how to write to use dsjobfatal()... i have never written such kind of senario's ...

Will appreciate your quick response
You can also try 2 more option.

1. Keep the sequencer in "ANY" mode and connect a Terminator stage to the Sequencer output. Now have a setting in Terminator to "Wait for all jobs to finish then abort". In this case if out of 5 jobs 3 jobs are running parallely and 4th job aborts then the Terminator will first let the 3rd and 5th parallel jobs to finish then will abort the sequence. Now when you restart the sequence it will only execute the 4th aborted job. But you need to have all job activities on settings of Reset if required and then Run.

2. All of your job activities can give a custom trigger output to the sequencer. In job activity you can set a custom trigger to check your job status. If its in warnings or fatal then the signal will be generated in that trigger. Now you can feed this output to a sequencer which is in "ANY" mode and connected to a Terminator as explained in point 1.
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
Post Reply