automatically handle activities that fail

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

automatically handle activities that fail

Post by vamsi.4a6 »

Hi i am using only one routine activity in Job Sequence which calls the server routine to get LINKROWCOUNT information


$INCLUDE DSINCLUDE JOBCONTROL.H

handle = DSAttachJob(argJobName,DSJ.ERRFATAL)

NumRows = DSGetLinkInfo(handle, argActiveStageName, argLinkName, DSJ.LINKROWCOUNT)

If NumRows < 0 Then
ErrorText = DSTranslateCode(NumRows)
Call DSLogWarn("Link count for " : argJobName : " > " : argActiveStageName : " > " : argLinkName : " = " : NumRows : ", " : ErrorText :".", "AnotherITCoGetJobStageLinkRowCount")
End Else
Call DSLogInfo("Link count for " : argJobName : " > " : argActiveStageName : " > " : argLinkName : " = " : NumRows : ".", "AnotherITCoGetJobStageLinkRowCount")
End

Ans = NumRows


The Job is Working fine, If I disabled the automatically handle activities that fail option otherwise it is aborted but i am not using Any Job activities in Job sequence.In both cases message is displayed properly in log as mentioned in DSLogWarn or DSLogInfo


Test_Routine..JobControl (fatal error from @Coordinator): Sequence job (restartable) will abort due to previous unrecoverable errors
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A routine returning other than zero is regarded as having failed by the "automatically handle" mechanism. To defeat this you require an explicit Failure trigger on the Routine activity.
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 »

As documented. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

@ray.wurlod
Thanks for your input.It is working fine now.
Post Reply