How can I log Errors / Exceptions to a file?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
wjfitzgerald
Participant
Posts: 72
Joined: Tue Feb 05, 2008 4:38 am

Post by wjfitzgerald »

Ray,

thanks for coming back to me. Unfortunatley i am not a premium poster and so where ever you were going to tell me to look is hidden to me.

Thanks for the repsonse though.

John FItz
mk_ds09
Participant
Posts: 72
Joined: Sun Jan 25, 2009 4:50 pm
Location: Pune

Post by mk_ds09 »

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
wjfitzgerald
Participant
Posts: 72
Joined: Tue Feb 05, 2008 4:38 am

Post by wjfitzgerald »

That's great thanks.

this self education thing is highly frustrating!

thanks again,

John Fitz
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think only the word "manual" was missing. Have removed premium status from message.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
wjfitzgerald
Participant
Posts: 72
Joined: Tue Feb 05, 2008 4:38 am

Post by wjfitzgerald »

thanks again ray.

I'll mark this post as resolved.

John Fitz
wjfitzgerald
Participant
Posts: 72
Joined: Tue Feb 05, 2008 4:38 am

Post by wjfitzgerald »

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
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

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"
wjfitzgerald
Participant
Posts: 72
Joined: Tue Feb 05, 2008 4:38 am

Post by wjfitzgerald »

fantastic, that's great thanks for the help.
John Fitz
Post Reply