Page 1 of 1

Return code handling

Posted: Fri Dec 31, 2010 1:31 am
by palak08
Hi,

I have a unix script which checks if file exist or not. If file exist then script returns 0 else 1. I want to handle return code like this:

If return code =1 then run next job , if return code =0 then send email.

My job design is like:

Code: Select all

Execute command------RC=1-------->Run sequence
      |
      |
     RC=0
      |
      |
    Send Email

Now when Return code =0 then my sequence job works fine but when RC=1 then it gives warning that shell command did not finish ok.

Is there a way to handle return code other than 0?

Posted: Fri Dec 31, 2010 2:49 am
by Ravi.K
Try with uncheck "Log warnings after activities that finishe with status other than OK".

You can find this option at "Job Properties" of Sequencer.

Posted: Fri Dec 31, 2010 7:59 am
by chulett
This can also be caused by the 'Automatically handle' compilation option in the Sequence. The built-in help explains how to override that "anything other than 0 is a failure" behaviour.

Posted: Fri Dec 31, 2010 9:09 am
by palak08
Thanks Ravi. That worked!
Ravi.K wrote:Try with uncheck "Log warnings after activities that finishe with status other than OK".

You can find this option at "Job Properties" of Sequencer.