I'd be very grateful for advice
Have created a UNIX script that runs our DataStage jobs.
After the JOB has run check the log file for either Warning or Fatal messages.
strConnect="$DSBin/dsjob -server 127.0.0.1 -user $DStageID -password $DStagePASS "
$strConnect -logsum -type WARNING $DSProject $jobname > $jobDSlogWarning
$strConnect -logsum -type FATAL $DSProject $jobname > $jobDSlogFatal
Problem is that the above looks at the logs for all runs of the job and not just the last. To get around this I clear the log after each run, but this is not ideal.
Is there a way to pick-up the log output from the last run?
THANKS
DSJOB getting details of Warnings / Fatals
Moderators: chulett, rschirm, roy
DSJOB getting details of Warnings / Fatals
Thanks
Steve
Steve
The command line interface doesn't give you that option, but it is available in the routines, you can get the most recent run information from DSGetJobInfo() and use that time value to get the appropriate entries via DSGetLogSummary().
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Thanks for that.
However, I need to put this into a UNIX batch script running overnight.
Could anyone suggest a way I can link dsjob - lognewest giving the newest log with dsjob - logsum so I can pull the latest log.
I'm NOT a shining star on UNIX scripting so am very grateful for any advice.
However, I need to put this into a UNIX batch script running overnight.
Could anyone suggest a way I can link dsjob - lognewest giving the newest log with dsjob - logsum so I can pull the latest log.
I'm NOT a shining star on UNIX scripting so am very grateful for any advice.
Thanks
Steve
Steve
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Just because you need it in a file doesn't mean you have to use UNIX scripting to get it. You could - more easily in my opinion - create a server job to do this task.
With -lognewest you should be able to filter on control messages and identify the newest "job started" message. You can extract the timestamp from that event (-logdetail) and use it to filter -logsum request.
With -lognewest you should be able to filter on control messages and identify the newest "job started" message. You can extract the timestamp from that event (-logdetail) and use it to filter -logsum request.
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.