How to abort sequenceafter unix script returns value >0

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
jagadam
Premium Member
Premium Member
Posts: 107
Joined: Wed Jul 01, 2009 4:55 pm
Location: Phili

How to abort sequenceafter unix script returns value >0

Post by jagadam »

Hi all,
I have a unix shell script which checks the count of stored procedure error from a text file and if there is any error my unix script returns a value greater than 0(Using word count)and then using execute command stage to check if the trigger >0 i am stopping the sequence job.
Now the requirement is to abort the sequence if trigger command is greater than 0. How can i achieve this? Can anyone please share their inputs.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

One way would be to turn on the "Automatically handle activities that fail" option as it considers a non-zero return to be a failure. Or you could run your failure check trigger to a Terminator stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

Post by chetan.c »

Hi,
Another option would be to use the Terminator Activity.
Based on the condition the flow can be directed towards the terminator activity.


IBM docs.
http://tinyurl.com/czfdh82.


Thanks,
Chetan.C
Post Reply