I have used the below routine for capturing fatals and mailing them.
But in the mail , thye full fatal is not displaying.
It's just dispalying as (....) .
Is there any way to expand that and view.
203\2011-07-07 06:13:18\3\Job_Activity_1\1\TL_RAW: GenericQuery:esqlErrorHandler (...)
204\2011-07-07 06:13:18\3\Job_Activity_1\1\TL_RAW: The provided query statement did not prepare correctly; (...)
205\2011-07-07 06:13:18\3\Job_Activity_1\1\main_program: Creation of a step finished with status = FAILED.
OK... that was off the top of my head and I got the function name wrong. Was it really that hard to try and look up what I really meant?
Switch it to DSGetLogEntry. Note that you'll need to include the use of DSGetNewestLogId as well from what I recall. Search for forums for examples of the syntax / usage.
-craig
"You can never have too many knives" -- Logan Nine Fingers
2011-07-07 08:49:25\adm\7\(Seqps) <- Acg: Job under control finished.
And one more thing is:
DSGetNewestLogId(hJob, DSJ.LOGANY) fetches all the entries in the log regardless of fatal,warning or information.
Is there any other option available to fetch the fatal alone?
You overwrite vEventDetail each iteration through the loop, but don't call DSSentMail() till you exit the loop. Why don't you specify in English what you want to achieve?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pandeesh wrote: DSGetNewestLogId(hJob, DSJ.LOGANY) fetches all the entries in the log regardless of fatal,warning or information.
Is there any other option available to fetch the fatal alone?
Yes and a quick check of the documentation should clear that up for you. Hint: you told it you wanted DSJ.LOGANY - that's not the only option.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Do you see how "Ans" was being treated as a dynamic arrary in the code you first posted and then you removed that bit of magic from the second iteration of the code? Now you want to treat your vEventDetail in that same fashion so it inserts a new array element each time through the loop rather than overwriting:
Then why are you looking for ANY "newest" id (which will get you the most recent log entry) and then going backwards to the beginning of everything in the log? As noted, you tell the DSGetNewestLogId function what type of newest id you want so there are a couple of approaches that would be more appropriate.
You can also capture the newest "starting" id, that way you either know where to stop if you are farming everything backwards, or where to start if you want things in the "proper" order in your EventDetail array.
-craig
"You can never have too many knives" -- Logan Nine Fingers