Dear all,
I have a Job Sequence which has two Jobs.
I am invoking this Job Sequence using Command Line.
I case of failure of this Job Sequence,I want the name of the Job which has made the sequence in aborted state.Means the Name of the Job which gets abort.
I am using command line for all operations of ETL Jobs.
I looked for logsum option of dsjob command but i know only the name of Sequence and that's why logsum option will not give me the actual reason for the aborted job.
So how we can find the name of the Job in a Sequence which has been aborted if you know only the Job Sequence Name?
Thanks in Advance
Arun
How to get tne name of Aborted Job in a Sequence
Moderators: chulett, rschirm, roy
Two options came up to my mind right now.
1. You can check the individual job logs for the status
2. You need to connect ExecuteCommand Activity to each JobActivity for Failed link and pass JobName as parameter to print it to a file. Your script can check for that predefined file for Job name when JobSequence is aborted.
1. You can check the individual job logs for the status
2. You need to connect ExecuteCommand Activity to each JobActivity for Failed link and pass JobName as parameter to print it to a file. Your script can check for that predefined file for Job name when JobSequence is aborted.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
JOB_STATUS=`$DSHOME/bin/dsjob -jobinfo $PROJECT $JOB | head -1 | cut -d"(" -f2 | cut -d")" -f1`
echo $JOBSTATUS
# Runnable Job Status codes-
# 1 "Finished"
# 2 "Finished (see log)"
# 9 "Has been reset"
# 11 "Validated OK"
# 12 "Validated (see log)"
# 21 "Has been reset"
# 99 "Compiled"
# NOT Runnable Job Status codes-
# 0 "Running"
# 3 "Aborted"
# 8 "Failed validation"
# 13 "Failed validation"
# 96 "Aborted"
# 97 "Stopped"
# 98 "Not Compiled"
echo $JOBSTATUS
# Runnable Job Status codes-
# 1 "Finished"
# 2 "Finished (see log)"
# 9 "Has been reset"
# 11 "Validated OK"
# 12 "Validated (see log)"
# 21 "Has been reset"
# 99 "Compiled"
# NOT Runnable Job Status codes-
# 0 "Running"
# 3 "Aborted"
# 8 "Failed validation"
# 13 "Failed validation"
# 96 "Aborted"
# 97 "Stopped"
# 98 "Not Compiled"
Run the command from the bin location of your DS installed on Windows.theverma wrote:Please note that i am using Windows Server Edition.
Can we get the name without modifying the Job?
I know to get solution we have to do changes but it would be really great if we can find out the solution without making any change to the Job.
Thanks
dsjob -jobinfo $PROJECT $JOB
1.Point a variable to the above command.
2. Catch job status.
3. Check if the value of the variable is in a Runnable state or Non-runnable state.
AND proceed.
That should do it.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The job sequence's log summary will include the exit status of each job invoked from the job sequence. If you have a hierarchy of job sequences you may need a more complex script using either iterative or recursive techniques to search the entire tree of control.
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.