Hi, thanks for reading.
Is there a way to get the previous job status for a sequencer or a job. If for example I have a sequencer that will always restart from the beginning, how can I ask the sequencer what it's last completion status was. If it finished with an abort or warning I want to send processing down different paths within the sequencer. I can't find any previous run status dskob commands.
thanks for any help you can give.
Get previous job completion status
Moderators: chulett, rschirm, roy
All you've got is the "most recent" job status, there's no history stored. So you'd have to check outside of the sequence itself as any checking the sequence itself does (say 'before job') would be after it had already started. Seems to me you'd need to have your job control check first and then pass in a parameter for the previous status so it knows how to behave. That job control could be a script or it could even be another 'wrapper' sequence that checks and then runs the sequence in question.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You could check the sequence's log, where there may be enough old entries for you to determine the most recent successful completion (after all, log purge does not occur if a job (or sequence) fails).
Otherwise, if you're on version 8.7 or later and have implemented DataStage Operations Console, then you can query the DSODB database for your history.
Otherwise, if you're on version 8.7 or later and have implemented DataStage Operations Console, then you can query the DSODB database for your history.
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.
You can get old statuses out of the log. I have a job in EtlStats which loops thru the RT_LOG file to get these old statuses and row count. You would have to convert it to either use dsjob or use the API to call a routine to get old log messages. Not too hard.
The easier way would be to call a job to start the sequence and before it starts it gets the last status. You could get last parameter values and row counts too if that would help.
The easier way would be to call a job to start the sequence and before it starts it gets the last status. You could get last parameter values and row counts too if that would help.
Mamu Kim