How to get the job status when the job aborted???
Moderators: chulett, rschirm, roy
How to get the job status when the job aborted???
Hi all,
Can we get the job status ('Aborted' ) when the job aborted( 4.x or 5.x) ???
Can I chk in the last transformer stage not to abort the job???
Thanks,
Can we get the job status ('Aborted' ) when the job aborted( 4.x or 5.x) ???
Can I chk in the last transformer stage not to abort the job???
Thanks,
Ice,
if the job has Aborted then it is no longer running, and therefore there is no way to check it's status inside of the job. The call to DSLogFatal() is immediate and doesn't return to any parts of the job.
Could you explain what you are trying to do and perhaps there is another way to solve this?
if the job has Aborted then it is no longer running, and therefore there is no way to check it's status inside of the job. The call to DSLogFatal() is immediate and doesn't return to any parts of the job.
Could you explain what you are trying to do and perhaps there is another way to solve this?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Dear ArndW,
Thank u so much for your response.
Actually what I wanna do is I would like to know whether the scheduled jobs are successfully runned or not.
If the job was aborted,I would like to know asap.
I am boring to chk manually everyday.
So I would like to make it to chk automatically.
Is there any way to do this???
Could u pls help me how can I solve this problem???
Thank u so much for ur help
Thank u so much for your response.
Actually what I wanna do is I would like to know whether the scheduled jobs are successfully runned or not.
If the job was aborted,I would like to know asap.
I am boring to chk manually everyday.
So I would like to make it to chk automatically.
Is there any way to do this???
Could u pls help me how can I solve this problem???
Thank u so much for ur help
ArndW wrote:Ice,
if the job has Aborted then it is no longer running, and therefore there is no way to check it's status inside of the job. The call to DSLogFatal() is immediate and doesn't return to any parts of the job.
Could you explain what you are trying to do and perhaps there is another way to solve this?
The UNIX level program "dsjob" will, with the correct options, give you the finish status of any job plus a lot of other information. You can use this as part of a script to automatically get this information.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Do u mean I can get the job status immediately???
Can I check in the transform stage???
Thanks,
Can I check in the transform stage???
Thanks,
ArndW wrote:The UNIX level program "dsjob" will, with the correct options, give you the finish status of any job plus a lot of other information. You can use this as part of a script to automatically get this information.
But I would like to know as soon as the job aborted.
So do u have any other idea???
Thanks,
So do u have any other idea???
Thanks,
chulett wrote:You can also schedule a little piece of job control code rather than the job itself and have the job control do all the normal bits - attach, prepare, run, wait, check status. Afterwards, do whatever needs doing if the job aborts.
ICE,
there are different ways of getting a job's status and the 3 most common means have been touched upon in this thread:
1. Read it from the Director
2. Retrieve it from UNIX using the dsjob command
3. Retrieve it from insideDataStage using DSGetJobInfo().
None of these seem to work for you and I don't know why not. What are you trying to do, and where do you wish to have a job status value available?
there are different ways of getting a job's status and the 3 most common means have been touched upon in this thread:
1. Read it from the Director
2. Retrieve it from UNIX using the dsjob command
3. Retrieve it from insideDataStage using DSGetJobInfo().
None of these seem to work for you and I don't know why not. What are you trying to do, and where do you wish to have a job status value available?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
ICE - that would be 'as soon as the job aborted'. The job aborts, ending immediately. The next line in the job control code notices and does whatever you need. Can't get sooner than that.ICE wrote:But I would like to know as soon as the job aborted.
So do u have any other idea???
Thanks,
chulett wrote:You can also schedule a little piece of job control code rather than the job itself and have the job control do all the normal bits - attach, prepare, run, wait, check status. Afterwards, do whatever needs doing if the job aborts.
You can't do stuff like this from inside the job - once it aborts it is done - you need to do your abort check post job.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 28
- Joined: Fri Jul 29, 2005 3:51 pm
- Location: Arizona, USA
Hi
You can write a subroutine to check the status of the job after the job has completed (DSGetJobInfo) and then depending on the status you can then use the DSSendMailTask to send you an email informing you ASAP if the job has failed or succeeded. (Refer to BASIC Manual).
You can run this subroutine as an After job subroutine from your job properties page.
Thats the fastest that you can get your information. This method is only suitable for less no of jobs. There are other methods for large no of jobs.
gradkarthik
You can write a subroutine to check the status of the job after the job has completed (DSGetJobInfo) and then depending on the status you can then use the DSSendMailTask to send you an email informing you ASAP if the job has failed or succeeded. (Refer to BASIC Manual).
You can run this subroutine as an After job subroutine from your job properties page.
Thats the fastest that you can get your information. This method is only suitable for less no of jobs. There are other methods for large no of jobs.
gradkarthik
-
- Participant
- Posts: 28
- Joined: Fri Jul 29, 2005 3:51 pm
- Location: Arizona, USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Make a batch containing the job and its checker job. Always run the batch. That way the checker job will be as immediate as possible in version 4.x. Aborts are immediate; nothing else in the job can be started once an abort condition has been signalled.
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.