Praveen_db2 wrote:
> DECLARE EXIT HANDLER FOR NO_DATA_FOUND
>
> --Get the error message text
> GET DIAGNOSTICS EXCEPTION 1 vSQL_MSG = MESSAGE_TEXT;
This is the end of of handler
>
> BEGIN
A nested compound statement, nothing more
> --Get the error message text
> -- GET DIAGNOSTICS EXCEPTION 1 vSQL_MSG = MESSAGE_TEXT;
>
> SELECT SQLSTATE
> INTO SQLSTATE_OUT
> FROM SYSIBM.SYSDUMMY1;
>
> SELECT SQL_DESC
> INTO SQLDESC_OUT
> FROM tb_ERROR
> WHERE SQL_STATE = SQLSTATE_OUT
> AND REFER = 'PROC1';
My bet: You're getting a 02000 right here. Exit handler, game over.
> END;
> UPDATE tb_RTB
> SET DESC = 'MGR'
> WHERE EMP_ID = iEMP_ID;
> END P1
If you drive this through the debugger it should show what happens.
Note that Developer Workbench works against DB2 V8.2, in case you don't
like Developer Center V8.
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/