Page 1 of 1

Exception handling in datastage

Posted: Tue May 22, 2007 4:06 am
by khanparwaz
Can we do exception handling in datastage?
By this I mean can we catch any datastage error and write it into a file.
Say for example if I am creating a file and datastage is not able to create the file due to some reason. In this case instead of datastage job failing I want to capture this error in the same job and write it into a log file.
Is it possible ?

Thanks in advance...

Posted: Tue May 22, 2007 4:13 am
by JoshGeorge
Yes you can. Capture the error log and write to file.

Posted: Tue May 22, 2007 4:56 am
by khanparwaz
JoshGeorge wrote:Yes you can. Capture the error log and write to file.
How can we do this ?
Can we write user defined messages ?

Posted: Tue May 22, 2007 5:38 am
by JoshGeorge
Check out this link:
http://dsxchange.com/viewtopic.php?p=23 ... ec4#236044


User defined messages takes it to a broader level. You will have to state what all are the expected warning/errors you like to define under this.

Re: Exception handling in datastage

Posted: Tue May 22, 2007 6:57 am
by chulett
khanparwaz wrote:Can we do exception handling in datastage?
By this I mean can we catch any datastage error and write it into a file.
Say for example if I am creating a file and datastage is not able to create the file due to some reason. In this case instead of datastage job failing I want to capture this error in the same job and write it into a log file.
Is it possible ?
No. Most errors of the kind you mentioned are not 'interceptable' and the DataStage job will fail regardless of your desires. And those messages will automatically be written to the log.

JoshGeorge is answering a different question - how to farm error messages from the job's log after it completes.

Re: Exception handling in datastage

Posted: Tue May 22, 2007 7:48 am
by JoshGeorge
khanparwaz wrote:Can we do exception handling in datastage?
...
Yes you can. In programatic terms, call all your jobs from a squence and you handle all the job aborts and warnings there.

Re: Exception handling in datastage

Posted: Tue May 22, 2007 7:58 am
by JoshGeorge
khanparwaz wrote:Say for example if I am creating a file and datastage is not able to create the file due to some reason. In this case instead of <b>datastage job failing </b> I want to capture this error in the same job and write it into a log file.
Is it possible ?
Well I missed the example :) What Craig said on that is right.