Page 1 of 1

How to fail Control-M job with exception thrown from OSQL

Posted: 24 Jan 2014 11:25
by RealControlMUser
We created a Control-M with OSQL and expect when the script through an SQL exception it can fail the Control-M, but it does not. The job is still green at the finish and the exception does show up in SYSOUT.

Is there a way the OSQL script is written, when raiseError it can fail/red the job?

Posted: 27 Jan 2014 5:39
by anirudhrh
hello,

I am not sure about OSQL , but i would suggest that u can mention in the step tab that when it finds any exception then it fails.


somethin like
On stmt = * code = exception*
Do NOTOK