Force a warning depending on Procedure Execution Result
Posted: Tue Jan 15, 2013 7:32 am
Hi everybody.
I am calling an SQL Server Stored Procedure through a job DataStage and, at the end of its execution, the job always finishes ok, independent on the Stored Procedure result.
I can see its Output variable by the Peek - at the log - but I can take any action about it.
I would like to provoke a warning in case of problems with the Procedure Execution. If there is a problem when execute an Update operation at the Proc, the RAISERROR doesn't appear at the Datastage log and there is no log to report it, only the Output variable tells me there is a problem.
The user must be notified and the job must finish with warnings or aborted.
How could I do this?
PS. I prefer not to use those rules to message handler.
Thank you very much,
I am calling an SQL Server Stored Procedure through a job DataStage and, at the end of its execution, the job always finishes ok, independent on the Stored Procedure result.
I can see its Output variable by the Peek - at the log - but I can take any action about it.
I would like to provoke a warning in case of problems with the Procedure Execution. If there is a problem when execute an Update operation at the Proc, the RAISERROR doesn't appear at the Datastage log and there is no log to report it, only the Output variable tells me there is a problem.
The user must be notified and the job must finish with warnings or aborted.
How could I do this?
PS. I prefer not to use those rules to message handler.
Thank you very much,