Page 1 of 2

Abort the Sequence as soon as job logs 1 warning

Posted: Wed Aug 30, 2006 9:18 am
by poorna_76
Hi All,

I have 5 jobs running through the Sequence , one after the other.

I would like the Sequence to abort as soon as JOB1 logs 1 warning message (MetaData mismatch error/Data truncation error).
How should I do this in Sequence?


I have done this in JobControl by using DSSetJobLimit & DSGetJobInfo functions, very easily.

I would like to do the same in the Sequence. How would i do that?

Thanks in Advance.

Posted: Wed Aug 30, 2006 9:36 am
by kris007
IMO it's not possible to abort the sequence as soon as any Job logs the first warning message. You can abort the sequence when any job finishes with warnings.

Posted: Wed Aug 30, 2006 9:50 am
by narasimha
Give this a try

Set the Trigger on JOB1 as OK - (Conditional), this way if JOB1 gets even 1 warning, it will abort the sequence.

Posted: Wed Aug 30, 2006 9:54 am
by poorna_76
kris007 wrote:IMO it's not possible to abort the sequence as soon as any Job logs the first warning message. You can abort the sequence when any job finishes with warnings.

In other words, i would like to set the job limit to "Abort after 1 warning",
for all the jobs in the Sequence.

How do i do that?


Thanks in Advance.

Posted: Wed Aug 30, 2006 9:57 am
by poorna_76
narasimha wrote:Give this a try

Set the Trigger on JOB1 as OK - (Conditional), this way if JOB1 gets even 1 warning, it will abort the sequence.
Thanks Narasimha.

NO, this did not work.

Posted: Wed Aug 30, 2006 10:02 am
by kris007
But again, the sequence will abort only after the Job1 finishes with warnings because, the warnings produced by Job1 are written to the log of Job1 and not to the log of the Sequence. Even if you set the Job sequence warning limit to 1, it won't be able to read the warnings produced by Job1 until job1 finishes. So..

Posted: Wed Aug 30, 2006 10:04 am
by kris007
Let me ask you one more question. When you say the Job1 aborts as soon as it logs its first warning, do you mean as soon as it encounters any rejects or is it just any other warning. If you can explain about this, may be we can have a solution in hand.

Posted: Wed Aug 30, 2006 10:05 am
by thumsup9
In the first job activity use Warning _ Conditional as Trigger and send this link to Routine Avtivity where you can call routine rtLogFatal.

or you can set Warning Limit to 1 in the Job Run Properties of Director.

Posted: Wed Aug 30, 2006 10:06 am
by meena
Hi,
In run job option/Limit/Warnings/Abort job after(01).Are you looking for this or anything else..
In other words, i would like to set the job limit to " Abort after 1 warning ",
for all the jobs in the Sequence.

How do i do that?

Posted: Wed Aug 30, 2006 10:13 am
by thumsup9
thumsup9 wrote:In the first job activity use Warning _ Conditional as Trigger and send this link to Routine Avtivity where you can call routine rtLogFatal.

or you can set Warning Limit to 1 in the Job Run Properties of Director.
You can create your own outine of Type Transform function as below

Call DSLogFatal("One or more jobs failed due to Warnings", Arg1)
Ans = 1

and call this in your routine activity.

Posted: Wed Aug 30, 2006 10:17 am
by kris007
thumsup9 wrote:
thumsup9 wrote:In the first job activity use Warning _ Conditional as Trigger and send this link to Routine Avtivity where you can call routine rtLogFatal.

or you can set Warning Limit to 1 in the Job Run Properties of Director.
You can create your own outine of Type Transform function as below

Call DSLogFatal("One or more jobs failed due to Warnings", Arg1)
Ans = 1

and call this in your routine activity.
Doesn't help. The main sequence will still abort only after Job1 finishes with warnings and the main sequence gets the status of Job1.

Posted: Wed Aug 30, 2006 10:24 am
by poorna_76
kris007 wrote:Let me ask you one more question. When you say the Job1 aborts as soon as it logs its first warning, do you mean as soon as it encounters any rejects or is it just any other warning. If you can explain about this, may be we can have a solution in hand.
If i run the job individually, i can set the job limit to 1.
When the job encounters 1 warning, it aborts.

Now since i am running the job through Sequence, i don't have control to set the job limit.

I would like to do the same thing while running the job through the Sequence too.

Hope it is clear now.

Thanks in Advance.

Posted: Wed Aug 30, 2006 10:26 am
by poorna_76
thumsup9 wrote:In the first job activity use Warning _ Conditional as Trigger and send this link to Routine Avtivity where you can call routine rtLogFatal.

or you can set Warning Limit to 1 in the Job Run Properties of Director.
Thanks thumsup9.

This does not help.

Posted: Wed Aug 30, 2006 10:31 am
by kris007
No. I have already understood that part. My question is why would a job finish with warnings in your case. Is it because, you are collecting rejects through a reject link and hence it finishes with warnings or you just want to be very very careful that you want it to abort as soon as it logs it first warning. What is your exact requirement? Why is it that you want it to abort after the very first warning message? Besides, the limit you can set in the Director is only during runtime. You can't achieve that while you schedule the job except you set it Project wide.

Posted: Wed Aug 30, 2006 10:36 am
by chulett
poorna_76 wrote:Now since i am running the job through Sequence, i don't have control to set the job limit.
Sure you do... or at least you should. If you run the Sequence job itself with a Warning Limit of 1 it should pass that limit to all child jobs it runs automatically. As noted, it's supposed to be as easy as that.