Getting DSGetLogSummary in More readable format
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 50
- Joined: Tue Jan 02, 2007 1:40 am
-
- Premium Member
- Posts: 133
- Joined: Tue Nov 23, 2004 11:24 pm
- Location: India
Hi Hemant
My DSGetLogSummary Looks as follows
DSMakeJobReport has the syntax to include a line break but DSGetLogSummary doesn't
Sorry if i sounded naive. i really didn't get where to use line seperator to get the required result
Thanks
Pavan
My DSGetLogSummary Looks as follows
Where do i fit the line seperator.CompleteJobEventDetail = DSGetLogSummary(DSJ.ME,DSJ.LOGANY,StartTime,EndTime,0)
DSMakeJobReport has the syntax to include a line break but DSGetLogSummary doesn't
Sorry if i sounded naive. i really didn't get where to use line seperator to get the required result
Thanks
Pavan
Use CONVERT(@FM,CHAR(10),YourResultString) to convert all field marks to carriage returns in your returned string.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Replace the field marks with linefeed characters (Char(10)).
Code: Select all
Convert(@FM, Char(10), DSGetLogSummary(DSJ.ME,DSJ.LOGANY,StartTime,EndTime,0))
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.
-
- Premium Member
- Posts: 133
- Joined: Tue Nov 23, 2004 11:24 pm
- Location: India
Great
Thanks a lot Ray and Arnd it worked.
The Log which i got out isn't complete log. it is more like an snap shot of the log
An Example log i got from DSGetLogSummary is as follows
In the above example where ever i had (...) gives me more info when i open it in the log.
But when i am writing it out i am expecting to get the whole information without the (...). Just so that i can go back if there is a problem and resolve it.
Is there any function i can use to get the whole log but not the snap shot
Thanks
Pavan
Thanks a lot Ray and Arnd it worked.
The Log which i got out isn't complete log. it is more like an snap shot of the log
An Example log i got from DSGetLogSummary is as follows
Code: Select all
636\2007-06-13 11:10:55\5\MACBNT\2\Starting Job FIF_Prep_Desc_InProgress_YP.MACBNT. (...)
637\2007-06-13 11:10:55\1\MACBNT\2\Environment variable settings: (...)
638\2007-06-13 11:10:55\1\MACBNT\2\Parallel job initiated (...)
But when i am writing it out i am expecting to get the whole information without the (...). Just so that i can go back if there is a problem and resolve it.
Is there any function i can use to get the whole log but not the snap shot
Thanks
Pavan
-
- Premium Member
- Posts: 133
- Joined: Tue Nov 23, 2004 11:24 pm
- Location: India
Chulett
If i am right i understand that DSGetLogEntry goes on the log with the Event id which i can get from DSGetNewestLogId. This will get me the latest event id but i am looking for the whole log.
I wondered if there is some way if i can get the event id's and hold them and fire my DSGetLogEntry with each event id but i don't guess it will work as my jobs are parallel and i am using an After Job Subrotuine to get this functionality of capturing the log.
Thanks
Pavan
If i am right i understand that DSGetLogEntry goes on the log with the Event id which i can get from DSGetNewestLogId. This will get me the latest event id but i am looking for the whole log.
I wondered if there is some way if i can get the event id's and hold them and fire my DSGetLogEntry with each event id but i don't guess it will work as my jobs are parallel and i am using an After Job Subrotuine to get this functionality of capturing the log.
Thanks
Pavan
Capture the last or latest event id before the job is run and save it in a file. Now you can have your after job sub routine read this file to get the first event id for your run, get the last event id and then use the GetLogEntry in a loop starting from the first event id to the last event id, to get your entire log for the run.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Entries are probably still buffered for writing when you're executing your after-job subroutine. Add a SLEEP of at least two seconds duration. Even better, use a Routine activity after the Job activity in a job sequence; in an after-job subroutine you can never catch the "job finishing" 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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 133
- Joined: Tue Nov 23, 2004 11:24 pm
- Location: India
Thanks all
The Only things which are getting cut out from the DSGetLogSummary are the environment variable setting and the configuration file setting which my client is ok with.
So Right now we will be going forward with what we have in place and if need arise i will code to include with the event id's or with the sleep like ray suggested.
Thanks for all the help
Thanks
Pavan
The Only things which are getting cut out from the DSGetLogSummary are the environment variable setting and the configuration file setting which my client is ok with.
So Right now we will be going forward with what we have in place and if need arise i will code to include with the event id's or with the sleep like ray suggested.
Thanks for all the help
Thanks
Pavan