you could use datastudio and run the sp with debug..
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be
Usually when I run into this situation i try to catch the error using a continuation handler.
***Note the sproc will continue on an -803 so you need to force the code to exit.
Try adding this to your code
1) add to the declarations:
-- IGNORE THE DUPLICATE ERRORS
DECLARE WHEREAMI_803 INT DEFAULT NULL;
DECLARE CONTINUE HANDLER FOR SQLSTATE '23505'
IF SQLSTATE = '23505' THEN
SET WHEREAMI_803 = 1;
2) add after each insert statement
INSERT INTO XYZ;
if whereami_803 = 1 then
SET NOTES = 'got 803 trying to insert into xyz';
3) add msg to your arguments: MYPROC(out NOTES CHAR(50)...) to print out message.
This will catch the 803 error and print out where you got it