Page 1 of 1
How to capture return code from a script and fail the Sequen
Posted: Fri Jul 02, 2010 8:13 am
by theone
I have BTeq script in a routine activity sequence, based on the return value how can I fail the Sequence?
Posted: Fri Jul 02, 2010 8:18 am
by chulett
This might help get you started, that or a search for "bteq". For 'Sequence failure' a link to a
Terminator stage is generallly what is needed but there are multiple ways to skin that cat.
Posted: Fri Jul 02, 2010 1:45 pm
by theone
I checked the form and found the syntax
"Call DSExecute('UNIX',Script A,Output,Error)"
I am using following :
Call DSU.ExecSH("/export/ds/xyz/abctest.sh", ErrCode)
If ErrCode <> 0
Then Call DSLogFatal("failed", rtnName)
am i doing the right way?
Posted: Fri Jul 02, 2010 2:41 pm
by chulett
Where are you doing this?
![Confused :?](./images/smilies/icon_confused.gif)
Posted: Fri Jul 02, 2010 5:10 pm
by theone
I did that in a custom defined server routine and calling it as before job sub routine
Posted: Fri Jul 02, 2010 9:10 pm
by chulett
Before
what job? I thought this was all happening in a Sequence job via the Routine Activity stage. Sounds like you are making this more difficult (and more hidden) than it really needs to be.
![Confused :?](./images/smilies/icon_confused.gif)