you did not declared any condition to be executed when not_found..
DECLARE CONTINUE HANDLER FOR not_found
SET at_end = 1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
SET ab_end = 1 ;
....
FETCH c1 INTO
v_name, v_creator, v_sinterval,v_rinterval ;
If at_end = 1 then
LEAVE fetch_loop ;
CREATE PROCEDURE DB2MONITOR.BPINS (
IN OPT VARCHAR(100),
..
hope this will help
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be