Page 1 of 1

Use of DSJ.ERRFATAL

Posted: Fri Aug 17, 2012 4:19 am
by lordlebu
Hi I am new to Datastage routines. I am analysing a job where the flow is taking me to a routine. Code is given below:

Code: Select all

Call DSU.AuditRoutineOne(InputArg1,DSJ.ERRFATAL)
FileName = InputArg2:InputArg3
Call DSU.AuditRoutineTwo(FileName,DSJ.ERRFATAL)
Ans="JobDone"
I want to know the use of DSJ.ERRFATAL over here. Thanks in Advance :)

Posted: Fri Aug 17, 2012 4:23 am
by ArndW
DSJ.ERRFATAL is a constant, the value is numeric. As a constant, it cannot be changed, thus the second parameter to these 2 user-written routines is an input-parameter. Without source code or more information, what is done with that value in the routines is a matter of conjecture.

Posted: Fri Aug 17, 2012 7:43 am
by chulett
Let me conject for a moment. :wink:

As noted, it is being passed to a "user defined" a.k.a a custom routine that is unknown to us. However, certain functions include an "Error Code" argument that tell the function how to handle any errors it encounters. From the documentation for one such function:
ErrorMode is a value specifying how other routines using the handle should report errors. It is one of:

DSJ.ERRFATAL Log a fatal message and abort the controlling job (default).
DSJ.ERRWARNING Log a warning message but carry on.
DSJ.ERRNONE No message logged - caller takes full responsibility.
I'm guessing it is being passed to functions inside the custom routine.