Page 1 of 1

Job abort communication in Sequence calling Sequence

Posted: Tue Nov 27, 2007 9:14 am
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

Posted: Tue Nov 27, 2007 9:30 am
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.

Posted: Tue Nov 27, 2007 11:54 am
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

Posted: Tue Nov 27, 2007 2:12 pm
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.

Re: Job abort communication in Sequence calling Sequence

Posted: Tue Nov 27, 2007 3:03 pm
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

Posted: Tue Nov 27, 2007 4:44 pm
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.

Posted: Tue Nov 27, 2007 11:51 pm
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

Posted: Wed Nov 28, 2007 12:01 am
by ray.wurlod
Read my post again. Carefully.

Posted: Tue May 27, 2008 6:26 am
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?

Posted: Tue May 27, 2008 6:29 am
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).