Hi All;
Am running DB2 LUW v8.2 (FP10) on AIX and having trouble with SQL
stored procedure bind options.
I have run the following code expecting to be able to change the
isolation level for this proc from the default of cursor stability to
repeatable read. I have experimented with placing COMMITS between the
statements and the procedure package is always created with the default
isolation of CS. For the life of me, I cannot get the
set_routine_opts() procedure to work. Help!? (and thanks in advance...)
Pete H
--------------------------------------------------------------------------------------------------------------------------------------------------
call set_routine_opts('ISOLATION RR');
CREATE PROCEDURE "SPPCH"."EDWUTIL_VALID_SYSIDS2" ( )
DYNAMIC RESULT SETS 1
LANGUAGE SQL
READS SQL DATA
BEGIN
DECLARE SQLCODE INTEGER DEFAULT 0 ;
-- use WITH RETURN TO CLIENT in DECLARE CURSOR to always
-- return a result set to the client application
DECLARE c1 CURSOR WITH RETURN TO CALLER FOR
select SYS_ID as value, SYS_DESC as meaning
from dd.SYSTEM
order by sys_id;
-- to return result set, do not CLOSE cursor
OPEN c1;
END;