Subsequence Failure propagation

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
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Subsequence Failure propagation

Post by gateleys »

I have designed my job sequences as suggested 'somewhere' in this forum. In short, the failure of any job is handled by 'Otherwise' links to a Sequencer stage (set to ANY). Further, the failure is notified, and the RoutineActivity is called to force fail the sequence, with the name of the sequence passed as parameter to the routine:

Code: Select all

Call DSLogFail(JobName, 'Job Has Failed')
Ans=''
It works perfectly fine. However, there is no difference in its execution or the log generated even when I pass some garbage as the JobName parameter to DSLogFail. As long as there is a failure within the sequence, it aborts and propagates the info to the parent sequence, which in turn, 'finishes' without proceeding further. That works fine with me. But, I am still baffled by the garabage parameter. Can somebody please throw light on this?

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

Post by ray.wurlod »

I prefer to propagate using UtilityWarningToLog() in a Routine activity. This means that I can retain control right back to the top level, which can instigate some diagnostic activity if required. Never abort!

To answer the actual question, the second argument to subroutines like DSLogInfo and DSLogWarn - I never use the other one! - is the value that appears in parentheses in the subject line of a logged event - which you can see in summary view. For example:

Code: Select all

Call DSLogInfo("Resizing completed", "Cleanup")
will log the following event, assuming from job named Resize job control routine:
Resize..Job Control (Cleanup): Resizing completed

This can be useful when you use the log functions for diagnostic purposes. For example:

Code: Select all

$IFDEF DEBUGGING
Call DSLogInfo("Value of loop counter is " : LoopIndex, "*Debugging*")
$ENDIF
It's then clear which messages relate to debugging in the job log.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In spite of Ray's misgivings around warnings versus aborts, Sequence jobs must be aborted in order for the Checkpoint Restarting to function as expected. Warnings don't cut the mustard.

If you don't have 7.5.x and all that fancy new Sequence job stuff, then a Warning is ok.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply