After Job Routine for Job Sequence
Moderators: chulett, rschirm, roy
After Job Routine for Job Sequence
Hello Friends,
My Requirement is to send a Status message from a Job Sequence to TIVOLI(IBM Monitoring Tool).Right now i am sending the Finished Status message of the jobs(in the Job Sequence) by executing an OS command in an After-Job Subroutine.
Please suggest how I can send the Finished status of the Job Sequence.
Thanks in advance!!!
My Requirement is to send a Status message from a Job Sequence to TIVOLI(IBM Monitoring Tool).Right now i am sending the Finished Status message of the jobs(in the Job Sequence) by executing an OS command in an After-Job Subroutine.
Please suggest how I can send the Finished status of the Job Sequence.
Thanks in advance!!!
Arun Verma
Define 'send the Finished status' or 'send a Status message from a Job Sequence'? Does that mean you need to send some kind of an email after a job completes? Or since we're talking a Scheduler, do you mean you are trying to control the exit / return status Tivoli sees?
Be more specific, explain what your requirements are, and more on what you are currently doing including this mysterious 'OS command' you are using.
Be more specific, explain what your requirements are, and more on what you are currently doing including this mysterious 'OS command' you are using.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
No, not clear yet. Capture in what sense? And then do what with this captured information?
If you are running your jobs using the dsjob command, the -jobstatus option will cause it to return the normal DataStage completion codes:
1 = Finished Ok
2 = Finished (see log)
3 = Aborted
etc. Would that help?
If you are running your jobs using the dsjob command, the -jobstatus option will cause it to return the normal DataStage completion codes:
1 = Finished Ok
2 = Finished (see log)
3 = Aborted
etc. Would that help?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I am using Director to Schedule my Job Sequence.I am not using any OS command to trigger the sequence.
Inside Job Sequence we have 3 Jobs(Job1,Job2,Job3)
In each Job i am using a After Job Subroutine.In that routine i am generating Job Report and then fetching out the Job Status of the current Job and sending this Job status to TIVOLI.
But in case of Job Sequence i donot have any option to attach After Job Subroutine.
Thanks
Inside Job Sequence we have 3 Jobs(Job1,Job2,Job3)
In each Job i am using a After Job Subroutine.In that routine i am generating Job Report and then fetching out the Job Status of the current Job and sending this Job status to TIVOLI.
But in case of Job Sequence i donot have any option to attach After Job Subroutine.
Thanks
Arun Verma
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
One way you can do this is with a simple parent job sequence that executes your job sequence then reports its status.
Another way is via a Routine activity that captures the "interim status" of the job sequence. Read the help on DSGetJobInfo(), particularly the DSJ.JOBINTERIMSTATUS key.
Another way is via a Routine activity that captures the "interim status" of the job sequence. Read the help on DSGetJobInfo(), particularly the DSJ.JOBINTERIMSTATUS key.
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.
Again, help me out here because I don't know beans about Tivoli. I've asked this before and you don't answer - how exactly are you 'sending this job status' to Tivoli?theverma wrote:In that routine i am generating Job Report and then fetching out the Job Status of the current Job and sending this Job status to TIVOLI.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I am Executing an OS command for TIVOLI to send the message.
I am using an AterJob Subroutine,which gets the status of the current job from the Job Report and then executing an OS Command with the required parameters to send the Message.
I am facing problem because we donot have After-Job Subroutine kind of facility for Job Sequence.So wondering from where to fire this Routine in case of Job Sequence.
Thanks !!!
I am using an AterJob Subroutine,which gets the status of the current job from the Job Report and then executing an OS Command with the required parameters to send the Message.
I am facing problem because we donot have After-Job Subroutine kind of facility for Job Sequence.So wondering from where to fire this Routine in case of Job Sequence.
Thanks !!!
Arun Verma
Umm... why not just use a Routine Activity (or Execute Command) stage at the end of the Sequence of jobs?
Inside the current job (after or inside, doesn't matter) you cannot get the 'job status' of the current job as it hasn't ended yet. If what you want is the status of the current job itself, what it *will* be assuming no other issues then you'll need to get the INTERIM status as Ray noted earlier. Read the online help, it explains the difference.
Inside the current job (after or inside, doesn't matter) you cannot get the 'job status' of the current job as it hasn't ended yet. If what you want is the status of the current job itself, what it *will* be assuming no other issues then you'll need to get the INTERIM status as Ray noted earlier. Read the online help, it explains the difference.
-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:
After job subroutines are not supported in job sequences. You either need to rewrite it as a transform function, or write a transform function that calls the after job subroutine that you already have, using a CALL statement.
The Routine activity in a job sequence can only execute a transform function.
The Routine activity in a job sequence can only execute a transform function.
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.