Page 1 of 1

capturing the stored procedure log

Posted: Wed Sep 04, 2013 9:54 am
by rameshybr
Hi,

I am using one stored procedure in the datastage job which loads the data from one layer to another layer.

The design is

row generator -----stored procedure stage----peek stage

I had an issue in the stored procedure it failed because of the "Violation of UNIQUE KEY constraint" but in the log there was no message and the job went successful.

Now I want to make the design thechange to abort the job when ever there is an issue in the stored procedure.

Please suggest how to do that.

Posted: Wed Sep 04, 2013 10:14 am
by chulett
What database? Basic answer would be to "raise an error" so the calling process knows something went wrong.

Posted: Wed Sep 04, 2013 11:01 am
by prasson_ibm
Hi There,
You need to get return value from SP and based on return value you need to success or fail the job, that you can do in downstream transformer stage.
First you have to understand and check the procedure what return code you get in case of fail and success.