Return code handling

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
palak08
Participant
Posts: 75
Joined: Thu Nov 04, 2010 5:54 pm

Return code handling

Post 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?
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post 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.
Cheers
Ravi K
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
palak08
Participant
Posts: 75
Joined: Thu Nov 04, 2010 5:54 pm

Post 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.
Post Reply