to run a job before the exit of 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
madhukar
Participant
Posts: 86
Joined: Fri May 20, 2005 4:05 pm

to run a job before the exit of sequencer

Post by madhukar »

Hi All,

i have 15 jobs. which runs in 5 streams(different branches) in a sequencer.
suppose a job aborts in the sequencer then i have to run job A and then exit sequence.

how can i achieve this?

Thanks.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If you are on 7.5x then you must be having exception handler. Connect Job A to it. See how exception handler works.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
madhukar
Participant
Posts: 86
Joined: Fri May 20, 2005 4:05 pm

Post by madhukar »

let me rephrase my question.

i need to run Job A when all the jobs in the sequencer is successful or if any of the job aborts.

thanks.
kishoreramachandran
Participant
Posts: 88
Joined: Tue Nov 28, 2006 9:33 pm

Post by kishoreramachandran »

you have the trigger option where you can specify that if the job is successful ( status = 0 that is ok) then do the next job, if the status is not ok then you do a different job as per your choice.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

It will be easy to help if you can share the structure of your sequence.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
madhukar
Participant
Posts: 86
Joined: Fri May 20, 2005 4:05 pm

Post by madhukar »

job1->job2-->job3-->job4
job5-->job6-->job7
job8-->job9

after job2 3 branches comes out of it.

whenever sequence exits (success or failure), i need job A to run then exit
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Build another sequence with two job activities. The first job activity will call your present sequence and the second job activity will run JOB A. The trigger will be "Unconditional".
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Code: Select all

                         ---        -->job3-->job4 
                             |     
 job1->job2-------->|               -->job5-->job6-->job7 
                             |     
                         ---        -->job8-->job9 
It looks ugly but have you tried something like this:

For success:

Take links out of job4, job7 and job9 with trigger "OK-Conditional" and feed them to a sequencer. Sequencer (Mode:ALL) output should go to the Job A.

For Failure:

Take links out of each job from 1 thru 9 with Trigger "Failed-Conditional" and feed them back to another sequencer (Mode: Any) whose output should go back to Job A.

Or the best way will be design another sequence an call the Job A depending on the success or Failure of Main Job Sequence.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
madhukar
Participant
Posts: 86
Joined: Fri May 20, 2005 4:05 pm

Post by madhukar »

Thanks for the replies

i am developing one more sequence which it checks the status of seq1 and runs job A.

i am trying to use UtilityGetRunJobInfo in routine activity and get the status of seq1. Unable to do it.

Can somebody help in this regard?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

madhukar wrote:
i am developing one more sequence which it checks the status of seq1 and runs job A.
But why? If the next job A is to be run whether previous jobs are successful or failure, then why check. Just run job A unconditionally.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A sequencer makes an any or all decision, and you probably need one. But the thing you use it IN is called a "job sequence", not a sequencer.
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