Read the documentation or search DSGetLogSummary or DSGetLogEntry. You might be able to get what you are looking for from one or both of these if I understand your question correctly.
Merry Christmas!
Bestest!
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
mystuff - as you've already guessed, the dsjob -logsum command will not let you filter the output; which is why jdmiceli suggested an alternate method.
I don't have a version of 7 to play with, but I think you might be able to use dsjob -jobinfo to get the message number or start date or wave number of the last run and then use the -logdetail option with the wave number or message number to retrieve that information.
The documentation shows the two options the command supports: -type to control what message types you want and -max to limit the number of records returned.
You'd need to pull a log summary and then use that to determine what information you want, what range of message numbers is needed. Then use the -logdetail option to pull the detailed logs for the rang in question.
-craig
"You can never have too many knives" -- Logan Nine Fingers
I don't have a version of 7 to play with, but I think you might be able to use dsjob -jobinfo to get the message number or start date or wave number of the last run and then use the -logdetail option with the wave number or message number to retrieve that information.
I don't see any option of wavenumber or message number in -logdetail. Am I missing something?
No, it seems not. But you can use the DSGet...() routines from a DataStage job to create exactly the type of log file you want; you can call this job using the dsjob command and then parse the output file as desired.
Not sure what you mean - the last parameter to the -logdetail function is the entry number you want. So you get the range from the summary function and then iterate through the range and pull all of the detail entries.
-craig
"You can never have too many knives" -- Logan Nine Fingers
You had mentioned that you were trying to do it from the command line, so what if you ran the dsjob -logdetail and piped it to a text file then used Perl or whatever to parse that file for what you are looking for.
Just a thought,
Bestest!
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
You had mentioned that you were trying to do it from the command line, so what if you ran the dsjob -logdetail and piped it to a text file then used Perl or whatever to parse that file for what you are looking for.
Just a thought,
Bestest!
John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services
"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
dsjob -lognewest will provinde the entry number. You can use that with the -logdetail option. It does'nt showup in help but it works. Atleast in 7.5.1A, it does.
You can save the entry number and use that entry number to get the log details after a certain date.
Say you want your script to generate logs for the last six days, save the entry number six days in advance and use that to get the log entry.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.