Job abort communication in Sequence calling Sequence

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
saikrishna
Participant
Posts: 158
Joined: Tue Mar 15, 2005 3:16 am

Job abort communication in Sequence calling Sequence

Post by saikrishna »

Hi

We have the project design as follows: (This is been designed to have generic format)

Main sequence -> calls ->Sub sequence -> calls ->Underlying jobs, depending on condition

In main sequence, We are passing a parameter, for the specific job to run from the sub sequence.

In the main sequence, we are updating the log whether particular job finished or aborted.

Currently what is happening is, when the underlying job aborts, then it is not recording as aborted by main sequence, because of not passing that information by sub sequence.

Is there any way to pass the underlying job status information to the calling main sequence from sub sequence?

Thanks
Sai
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You have to propogate the error 'upwards', cause the main Sequence to abort when there's trouble with a sub-sequence. Look into the 'Utility' routines to write log messages, including fatal ones.
-craig

"You can never have too many knives" -- Logan Nine Fingers
saikrishna
Participant
Posts: 158
Joined: Tue Mar 15, 2005 3:16 am

Post by saikrishna »

Exactly Chullett

I would want to pass some message back to main sequence from sub sequence without sub sequence being aborted...How can I do that?

Can you please tell me the utility name with which I can do this

Thanks
Sai
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

Why not use a Routine in your main sequence to get the status of each job after all of them have finished? You could use the following to read the status of each job -

Code: Select all

DSGetJobInfo(hJob, DSJ.JOBSTATUS)
where hJob is the Job Handle.
gateleys
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Re: Job abort communication in Sequence calling Sequence

Post by Krazykoolrohit »

saikrishna wrote: In the main sequence, we are updating the log whether particular job finished or aborted.
Why not update the log from the sub sequence? Update the log as and where the job gets called
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can prevent the sub-sequence from aborting by explicitly handling failure of its activities.

You can set the compile options automatically to log a warning if an activity fails to finish successfully.

You can create a routine that writes an informational or warning entry into the controller's log using the DSLogEvent() function, and invoke that via a Routine activity in a control path that handles errors.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rohitchattar
Premium Member
Premium Member
Posts: 24
Joined: Thu Jun 21, 2007 1:20 am

Post by rohitchattar »

Hi

By writing fatal/warning/info entries in the sub sequence log about underlying job status, will that information avaiable to the main sequence?, if so how?

And also I want by writing either of the fatal/warning/info into subsequence, I dont want to abort that sub sequence.


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

Post by ray.wurlod »

Read my post again. Carefully.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
saikrishna
Participant
Posts: 158
Joined: Tue Mar 15, 2005 3:16 am

Post by saikrishna »

Hi Ray,

How do I get the following?
By writing fatal/warning/info entries in the sub sequence log about underlying job status, will that information avaiable to the main sequence?, if so how?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Log warnings for any activity that fails to complete successfully. That will alert the parent sequence that there is something for which to search. It can use a routine that invokes DataStage API functions to examine the log. If you use Exception Handler or explicit failure handling, you can also write directly to the log of the controller (again from a routine).
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