Hi All,
In this job I am working at I have to write custom messages in the exception report file.
Messages like "Output file failed to open"
No of records parsed in each link
No of records parsed with a particular field being NULL
On completion of output file write it shoul mention that the output file has been closed and end with a end timestamp.
ANy suggestions or ideas on how to contruct such a file.
Thanks
PIyush
Read log files and write custom messages in Exception file.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Re: Read log files and write custom messages in Exception fi
After the job completes you can call your routine and generate this report.
If the file failed to open your job would have aborted, in that case your first field can be job status. Here you can capture the specific fatal error reason and state user specific messages for the ones you can anticipate (Else a default one or the real fatal message from the log) in case of failure. (Ex: Messages like "Output file failed to open"). Link row counts can be retrieved using the respective functions after job handling.
No of records parsed with a particular field being NULL - This can be written to a file or user status using a counter inside the job and retrieved inside the routine. For end timestamp again use any function call of your preference.
If the file failed to open your job would have aborted, in that case your first field can be job status. Here you can capture the specific fatal error reason and state user specific messages for the ones you can anticipate (Else a default one or the real fatal message from the log) in case of failure. (Ex: Messages like "Output file failed to open"). Link row counts can be retrieved using the respective functions after job handling.
No of records parsed with a particular field being NULL - This can be written to a file or user status using a counter inside the job and retrieved inside the routine. For end timestamp again use any function call of your preference.
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use DSGetLogSummary() to determine whether there were any warnings. Presumably, if there were none, you don't want to write to the exceptions file. You can obtain the row counts from "active stage finishing" messages in the log.
Statements OpenSeq, WeofSeq or Seek, WriteSeq and CloseSeq will allow you to work with a text file from a routine. To save a lot of work and to obviate the first three, search the forum for a function called OpenSequentialFile.
Statements OpenSeq, WeofSeq or Seek, WriteSeq and CloseSeq will allow you to work with a text file from a routine. To save a lot of work and to obviate the first three, search the forum for a function called OpenSequentialFile.
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That, my friend, is called consulting, and is how some of us make our living.
If you would like to post what you have attempted, and why you believe it does not fulfil expectations (with error messages if any exist), then we would certainly comment upon that.
Make sure your code is nicely formatted and commented, and enclose it in Code tags.
If you would like to post what you have attempted, and why you believe it does not fulfil expectations (with error messages if any exist), then we would certainly comment upon that.
Make sure your code is nicely formatted and commented, and enclose it in Code tags.
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.