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...
Exception handling in datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 60
- Joined: Tue Jul 12, 2005 3:34 am
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Yes you can. Capture the error log and write to file.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 60
- Joined: Tue Jul 12, 2005 3:34 am
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
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.
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.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Re: Exception handling in datastage
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.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 ?
JoshGeorge is answering a different question - how to farm error messages from the job's log after it completes.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Re: 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.khanparwaz wrote:Can we do exception handling in datastage?
...
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Re: Exception handling in datastage
Well I missed the example What Craig said on that is right.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 ?
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>