Usage of the DSLogFatal function

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
katz
Charter Member
Charter Member
Posts: 52
Joined: Thu Jan 20, 2005 8:13 am

Usage of the DSLogFatal function

Post by katz »

I have questions regarding the DSLogFatal Function. The BASIC Guide warns that DSLogFatal should not be used in a transform. Use DSTransformError instead. However, the DSTransformError function only logs a warning message, not a fatal one.

The sdk routine UtilityAbortToLog uses the DSLogFatal function but warns, in its Long Description, The routine should not be used in production.

I understand that it is preferred practice to always pop-off all the program stack entries to cleanly exit the process, but what are the real potential consequences of using the DSLogFatal function in a Transformer, or using the UtilityAbortToLog routine in production? (e.g. orphaned resources, corrupted job status, etc.?).

Supposing that I want to abort a server job; side-stepping any debate whether this is good practice, or not. How do I manage the 'cleanest possible' abort from within the job (i.e. excluding methods using Before-After routines that return a non-zero return-code)?

Thanks,
katz
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

DSLogFatal will log a message before it fails the job. I think it would be cleaner.
Mamu Kim
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I agree with Kim - DSLogFatal() should be used in your case. The warnings have more to do with having devlelopers avoid terminating jobs than with any side-effects involved in using the function.
katz
Charter Member
Charter Member
Posts: 52
Joined: Thu Jan 20, 2005 8:13 am

Post by katz »

Thanks for you replies.

I have always used the DSLogFatal function in instances where there is an imperative need to abort the job, but on this project I need to justify its use in light of the warning printed in the BASIC guide.

I was thinking that there is perhaps a better method to abort the job, which I was unaware of.

katz
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

katz wrote:Thanks for you replies.
I was thinking that there is perhaps a better method to abort the job, which I was unaware of.

katz
Not really.
Mamu Kim
Post Reply