Hi all,
We have a requirement in our project to capture job log for each job in a sequential file. The following routine returns the log for a particular job for the last ran day.
This is a very popular topic lately. I'm still somewhat at a loss as to why people would want to capture and save all of this information. Metrics, yes, but entire job logs? Ok, if that's what you need to do...
Basically, you need to tell it when to start as by default it will give you everything in the log. There is syntax for determining the starting timestamp of the most recent job run, from what I remember. Search the forum. The topic has been discussed alot and various solutions are waiting here, depending on the approach you want to take.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Sridhar G wrote:Hi all,
We have a requirement in our project to capture job log for each job in a sequential file. The following routine returns the log for a particular job for the last ran day.
Can anybody give an idea on how to get the log for only the last run and not for the entire day.
Sridhar G
Hi <B>Unfortunately</B> , the above code gives you only the last log detail for the day and not the complete log. :D
or do you want it for the whole day
Sridhar G wrote:Can anybody give an idea on how to get the log for only the last run and not for the entire day.
Searching the forum will turn up lots of advice on this, including this post.
The Code Sridhar has given does exactly what he wants , ie, if there are 10 runs on a given day , it will give me only the details for the 10th run (ie, the last run) and not the previous ones . please let me know if this is <b>NOT</b> the requirement
I would like to make use of the DSGetLogSummary function, but I guess I have not quite understood where in DataStage I need to palce this function and extract the information it returns. I see the info in Diretor by viewing the log, but I want to get a dump of that where else.
Preferably I want to do it in Unix if at all possible.
I would like to make use of the DSGetLogSummary function, but I guess I have not quite understood where in DataStage I need to palce this function and extract the information it returns. I see the info in Diretor by viewing the log, but I want to get a dump of that where else.
Preferably I want to do it in Unix if at all possible.
All of the DSGet* functions have an equivalent option in 'dsjob' from the command line. For example, DSGetLogSummary is the -logsum option from what I recall. So it is perfectly feasible to script something rather than code up a routine to do this.
Bone up on it by reading the Server Job Developer's Guide section on the Command Line Interface which is kind of buried down near the bottom of the 'DataStage Development Kit (Job Control Interfaces)' Chapter.
-craig
"You can never have too many knives" -- Logan Nine Fingers