How can I log Errors / Exceptions to a file?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The exception handler has two or three activity variables that report, for example, an error code and the name of the activity that failed. I'm travelling at the moment so can't check, but you can find them in the manual.
Last edited by ray.wurlod on Fri Jan 30, 2009 2:52 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 72
- Joined: Tue Feb 05, 2008 4:38 am
John,
Whenever there is failure of the job, all the datastage logs you can write to the file..
Dsjob function can give you all the log depending upon your requirements.
Here you can write all the info message/warnings/errors.
So create one file which will be amended whenever a parallel job executes. So whenever there is failure it can be checked by viewing this file. It will contain all the messages that could help you to determine the exact cause of failure..
Hope this helps
-------------
MK
Whenever there is failure of the job, all the datastage logs you can write to the file..
Dsjob function can give you all the log depending upon your requirements.
Here you can write all the info message/warnings/errors.
So create one file which will be amended whenever a parallel job executes. So whenever there is failure it can be checked by viewing this file. It will contain all the messages that could help you to determine the exact cause of failure..
Hope this helps
-------------
MK
-
- Participant
- Posts: 72
- Joined: Tue Feb 05, 2008 4:38 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 72
- Joined: Tue Feb 05, 2008 4:38 am
-
- Participant
- Posts: 72
- Joined: Tue Feb 05, 2008 4:38 am
Sorry about this, a quick follow up if i might:
MK, is it possible to make the call of DSJob function in the after job routine conditional on the job itself failing? i presume it is relatively straight forward, and that you would write a basic routine to check the return status, and make the call of DSJob conditional? if so, how do you refernce the status?
thanks again,
John FItz
MK, is it possible to make the call of DSJob function in the after job routine conditional on the job itself failing? i presume it is relatively straight forward, and that you would write a basic routine to check the return status, and make the call of DSJob conditional? if so, how do you refernce the status?
thanks again,
John FItz
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
Example;
Code: Select all
vJOB_STATUS = DSTranslateCode(DSGetJobInfo(DSJ.ME, DSJ.JOBINTERIMSTATUS))
* The interim status of the just completed job itself
IF vJOB_STATUS = "Finished OK"
-
- Participant
- Posts: 72
- Joined: Tue Feb 05, 2008 4:38 am