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

Post Reply
User avatar
RealControlMUser
Nouveau
Nouveau
Posts: 1
Joined: 24 Jan 2014 12:00

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

Post by RealControlMUser » 24 Jan 2014 11:25

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?

User avatar
anirudhrh
Nouveau
Nouveau
Posts: 48
Joined: 21 Sep 2013 12:00

Post by anirudhrh » 27 Jan 2014 5:39

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
Anirudh

Post Reply