Is there a way to check the return status from a stored procedure when
called from a OS (Windows) script?
I have a stored procedure that does some checking in the database, and the
return status is set to 0 or -1 if 'OK' or 'not OK' respectively.
When I call the from CLP I get something like this:
Value of output parameters
--------------------------
Parameter Name : P_SQLSTATE
Parameter Value : 00000
Parameter Name : P_MESSAGE
Parameter Value :
Return Status = 0
I want to do this in my script:
db2 call proc(?, ?)
if RC= 0 then do something
else then do something else
If I run this script from the Task Center, is there a way to 'force' the
task to fail if the return status is not 0 ?
Regards
Odd B Andersen
ErgoGroup AS, Oslo, Norway