Job Status
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto
Job Status
Hi,
I am stuck in problem, which is as follows:
I have a sequence job, called as Master Sequence, SEQ01.
The SEQ01 has following flags set:
1. Add checkpoints so sequence is restartable on failure.
2. Automatically handle activities that fail~
So, in the above case, if a any job or job sequences inside
SEQ01 fail, then the SEQ01 is left as Aborted/Restartable.
This has been fulfilling my purpose very well.
Now my new requirement is to send the status of SEQ01 to Tivoli.For this I have designed a routine to read the status of this SEQ01
after it has finished Ok or Finished with Warnings or Aborted/Restartable...
I approached like this:
I created a new Sequence , MSEQ, which contained SEQ01, linked to the
routine which send the message to Tivoli. The connecting link condition
is Unconditional ( idea being that the routine is triggered irrespective
of the finishing status of SEQ01 ).
This MSEQ has to be Restartable , so that in case of any aborts etc,
I am able to restart the SEQ01 ( which is now being controlled by MSEQ ).For MSEQ, if I set the following flags,
1. Add checkpoints so sequence is restartable on failure.
2. Automatically handle activities that fail,
then if SEQ01 aborts, then the routine is not getting triggerred,
and the MSEQ is left as Aborted/Restartable.
If I donot set the above flags, then the routine is triggered,
BUT the MSEQ is not finshing as Aborted/Restartable. It finsihes Ok.
BUT I need the MSEQ to be Restarable !!!!
I tried using an Exception handler, and also unset the flag:
1. Automatically handle activities that fail
The exception handler triggers well, triggering the routine...
but again it leaves the MSEQ as Finished, again not Aborted/Restartable !!!
If I want to create BATCH job, then I dont know how to create
a Restartable BATCH JOB ???
Please advice.
Thanks
I am stuck in problem, which is as follows:
I have a sequence job, called as Master Sequence, SEQ01.
The SEQ01 has following flags set:
1. Add checkpoints so sequence is restartable on failure.
2. Automatically handle activities that fail~
So, in the above case, if a any job or job sequences inside
SEQ01 fail, then the SEQ01 is left as Aborted/Restartable.
This has been fulfilling my purpose very well.
Now my new requirement is to send the status of SEQ01 to Tivoli.For this I have designed a routine to read the status of this SEQ01
after it has finished Ok or Finished with Warnings or Aborted/Restartable...
I approached like this:
I created a new Sequence , MSEQ, which contained SEQ01, linked to the
routine which send the message to Tivoli. The connecting link condition
is Unconditional ( idea being that the routine is triggered irrespective
of the finishing status of SEQ01 ).
This MSEQ has to be Restartable , so that in case of any aborts etc,
I am able to restart the SEQ01 ( which is now being controlled by MSEQ ).For MSEQ, if I set the following flags,
1. Add checkpoints so sequence is restartable on failure.
2. Automatically handle activities that fail,
then if SEQ01 aborts, then the routine is not getting triggerred,
and the MSEQ is left as Aborted/Restartable.
If I donot set the above flags, then the routine is triggered,
BUT the MSEQ is not finshing as Aborted/Restartable. It finsihes Ok.
BUT I need the MSEQ to be Restarable !!!!
I tried using an Exception handler, and also unset the flag:
1. Automatically handle activities that fail
The exception handler triggers well, triggering the routine...
but again it leaves the MSEQ as Finished, again not Aborted/Restartable !!!
If I want to create BATCH job, then I dont know how to create
a Restartable BATCH JOB ???
Please advice.
Thanks
Share to Learn, and Learn to Share.
Re: Job Status
Is there something magical about Tivoli that requires anything 'extra' be done for it to know the status of a job it ran? I don't see the point of adding yet-another-level of controlling Sequence job or batch control code or any special routine for something that sounds pretty darn simple.asitagrawal wrote:Now my new requirement is to send the status of SEQ01 to Tivoli.For this I have designed a routine to read the status of this SEQ01 after it has finished Ok or Finished with Warnings or Aborted/Restartable...
First off, I assume that Tivoli is actually launching this job and you are using dsjob in some capacity to do this, yes?
It should see the exit status of the job automagically unless you've done something (in a wrapper script, perhaps) that is preventing that. And if you need to know the status of the controlled job, why not just add -jobstatus to your dsjob command line? Having it return the 'jobstatus' would mean an exit code of 1 for Finished OK, 2 for Finished with warnings, 3 for Aborted - etc, etc. Then any Enterprise Scheduler should be able to take appropriate actions based on those codes.
Wouldn't that work for you?
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto
Tivoli is not triggerring this job.
The job is being scheduled from DataStage Director itself..
Actually, I need to sedn the status if each job to Tivoli, for the Production Support Team. Now For this I have created a After Job Routine and attached it to each job. So the finishing status of each job is published to Tivoli.
BUT the problem comes when a job is not even Triggerred , due to say Time Out Error ( Error Code = -14 ).. the Job's finishing status is never published... rather the only status reflected is of the Master Sequence...
So I need to publish the finishing status of the Master Sequence in this case... and hence the need...![Sad :(](./images/smilies/icon_sad.gif)
The job is being scheduled from DataStage Director itself..
Actually, I need to sedn the status if each job to Tivoli, for the Production Support Team. Now For this I have created a After Job Routine and attached it to each job. So the finishing status of each job is published to Tivoli.
BUT the problem comes when a job is not even Triggerred , due to say Time Out Error ( Error Code = -14 ).. the Job's finishing status is never published... rather the only status reflected is of the Master Sequence...
So I need to publish the finishing status of the Master Sequence in this case... and hence the need...
![Sad :(](./images/smilies/icon_sad.gif)
Share to Learn, and Learn to Share.
Well, here's a crazy thought - why not use Tivoli to actually schedule and run your DataStage jobs rather than cron?
Isn't that why you have it? With something like Tivoli or Control-M there's no "need" for cron, it should only be what you use when you have no other choice - when you don't have something in the way of an Enterprise Scheduler.
That would greatly simplfy your life and solve all these little problems you are finding with the methodology you've chosen.
![Shocked :shock:](./images/smilies/icon_eek.gif)
That would greatly simplfy your life and solve all these little problems you are finding with the methodology you've chosen.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto
Hey Chulett,
Let me stress on the requirement for which I need to send the status of the controlling sequence, which is this:
And am sorry, I did not understand what u meant by cron ??
Let me stress on the requirement for which I need to send the status of the controlling sequence, which is this:
I donot understand that how would triggerring the jobs from Tivoli help in this ?? Do u mean that If a job sequence, which ran from Tivoli etc, has aborted then the message will be there itself... right ??BUT the problem comes when a job is not even Triggerred , due to say Time Out Error ( Error Code = -14 ).. the Job's finishing status is never published...
And am sorry, I did not understand what u meant by cron ??
Share to Learn, and Learn to Share.
YESasitagrawal wrote:I donot understand that how would triggerring the jobs from Tivoli help in this ?? Do u mean that If a job sequence, which ran from Tivoli etc, has aborted then the message will be there itself... right ??
Ah... that would be because you are on a Windows server rather than a UNIX one. Substitute 'AT' for 'cron' in my previous message.asitagrawal also wrote:And am sorry, I did not understand what u meant by cron ??
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto
Sheesh. It is the scheduler built into Windows and what the DataStage Director leverages when you say 'Add to Schedule'. It is pretty bare-bones feature wise.
A UNIX server would have two equivalent processes: 'cron' and 'at'. Cron would be used to schedule repeating tasks whereas at is used to execute a single (one time) task.
A UNIX server would have two equivalent processes: 'cron' and 'at'. Cron would be used to schedule repeating tasks whereas at is used to execute a single (one time) task.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 273
- Joined: Wed Oct 18, 2006 12:20 pm
- Location: Porto
Hey Guys,
the problem is resolved like this:
I am not allowing the MSEQ to handle the failure of SEQ01.
So as a result the MSEQ is finishes, triggerring the routine to send the
status of SEQ01 to Tivoli. The SEQ01 anyhow is Restartable...
So, now when I run the MSEQ again, the SEQ01 is restarted from its Checkpoints .. this is exactly what I wanted !! :D
thnc to all !!
the problem is resolved like this:
I am not allowing the MSEQ to handle the failure of SEQ01.
So as a result the MSEQ is finishes, triggerring the routine to send the
status of SEQ01 to Tivoli. The SEQ01 anyhow is Restartable...
So, now when I run the MSEQ again, the SEQ01 is restarted from its Checkpoints .. this is exactly what I wanted !! :D
thnc to all !!
Share to Learn, and Learn to Share.