Hi Guys,
I have shell script which is currently returning return code of 3.
I am calling this script from my datastage job as a After-Job Subroutine. I expect the job to fail but the job is Finished(with Warning) status.
Can somebody help me as what i am doing wrong.
Cheers!!!!!
Abort a Job from Shell script called from After-Job Subrouti
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 126
- Joined: Thu Jul 01, 2010 11:39 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Which after-job subroutine are you using?
Check out its source code, and learn how it handles the exit status of the executed command.
To have the job abort, the ErrorCode argument must be set to a non-zero value.
Make sure, too, that the after-job subroutine is actually being executed; for example is the "only execute if job successful" check box selected?
Check out its source code, and learn how it handles the exit status of the executed command.
To have the job abort, the ErrorCode argument must be set to a non-zero value.
Make sure, too, that the after-job subroutine is actually being executed; for example is the "only execute if job successful" check box selected?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 126
- Joined: Thu Jul 01, 2010 11:39 pm
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
execSH will have a output and return code and unless the return code is anything other than 0 (say in case it is not able to execute the script) it will not be handled.
What you can do is to write a wrapper routine and Set the ErrorCode in based on the output value.
What you can do is to write a wrapper routine and Set the ErrorCode in based on the output value.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.![Wink :wink:](./images/smilies/icon_wink.gif)
Genius may have its limitations, but stupidity is not thus handicapped.
![Wink :wink:](./images/smilies/icon_wink.gif)
-
- Participant
- Posts: 126
- Joined: Thu Jul 01, 2010 11:39 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: