
Hi All,
I don't have access to SYSIBM schema and SYSIBM>SYSDUMMY1. I want to get value of SQLSTATE & SQLCODE into exit handler and store into output parameters.
I tried following code:
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN NOT ATOMIC
SET SQLCODE_OUT = SQLCODE; ---1
SET SQLSTATE_OUT = SQLSTATE; ---2
END;
but for second statement (--2) it always gives value '00000' as previous one executed successfully.
Can anyone let me know how to get value of SQLSTATE AND SQLCODE in single statement without using SYSIBM.SYSDUMMY1.
Thanks in Advance,