I have successfully created and deployed a DB2 SQL stored procedure using the wizard IBM RDi SOA (RBD + RDP). Also after running the stored procedure it is returning me the correct result in the SQL Result view. But I can’t able to debug the stored procedure
While creating the stored procedure I have checked the Deploy on Finish and Enable debugging check boxes. I have started the DB2DBGM.bat session manager. Also set up the RDP preferences (Window -> Preferences -> Run/Debug -> Routine Debugger -> DB2 -> SQL and Java) Use an already running session manager with the IP address and Port number as showing in the db2dbgm session which is running in my PC.
From the Data Project Explorer perspective after right clicking my sample DB2 Stored project when I click to the Debug option it is not launching the debug view to open my stored procedure so that I can step through. I have also tried after setting up the break point. Just it is running and output the result in the SQL Result view, simple like Run option.
Can anyone please help me out on this.
Thanks & Regards
Dibs
Below is the stored procedure for your further references
CREATE PROCEDURE SPEMPLOYEE_TEST2 (IN offcode VARCHAR(10),
OUT SQLSTATE_OUT CHAR(5),
OUT SQLCODE_OUT INTEGER )
RESULT SETS 1
LANGUAGE SQL
ALLOW DEBUG MODE
------------------------------------------------------------------------
-- SQL Stored Procedure
-- offcode
-- SQLSTATE_OUT
-- SQLCODE_OUT
------------------------------------------------------------------------
------------------------------------------------------------------------
-- Variables declaration fragment inserted from UDFSCA_SQL_VAR.FRAGMENT
------------------------------------------------------------------------
P1: BEGIN
-- Declare variables
DECLARE SQLSTATE CHAR(5) DEFAULT '00000';
DECLARE SQLCODE INT DEFAULT 0;
-- Declare cursor
DECLARE cursor1 CURSOR FOR
SELECT EMPLOYEENUMBER, FIRSTNAME, JOBTITLE, LASTNAME, OFFICECODE
FROM EMPLOYEES
WHERE OFFICECODE = offcode;
-- Declare handler
DECLARE EXIT HANDLER FOR SQLEXCEPTION
SELECT SQLSTATE, SQLCODE INTO SQLSTATE_OUT, SQLCODE_OUT
FROM SYSIBM.SYSDUMMY1;
-- Cursor left open for client application
OPEN cursor1;
SET SQLSTATE_OUT = SQLSTATE;
SET SQLCODE_OUT = SQLCODE;
END P1
While creating the stored procedure I have checked the Deploy on Finish and Enable debugging check boxes. I have started the DB2DBGM.bat session manager. Also set up the RDP preferences (Window -> Preferences -> Run/Debug -> Routine Debugger -> DB2 -> SQL and Java) Use an already running session manager with the IP address and Port number as showing in the db2dbgm session which is running in my PC.
From the Data Project Explorer perspective after right clicking my sample DB2 Stored project when I click to the Debug option it is not launching the debug view to open my stored procedure so that I can step through. I have also tried after setting up the break point. Just it is running and output the result in the SQL Result view, simple like Run option.
Can anyone please help me out on this.
Thanks & Regards
Dibs
Below is the stored procedure for your further references
CREATE PROCEDURE SPEMPLOYEE_TEST2 (IN offcode VARCHAR(10),
OUT SQLSTATE_OUT CHAR(5),
OUT SQLCODE_OUT INTEGER )
RESULT SETS 1
LANGUAGE SQL
ALLOW DEBUG MODE
------------------------------------------------------------------------
-- SQL Stored Procedure
-- offcode
-- SQLSTATE_OUT
-- SQLCODE_OUT
------------------------------------------------------------------------
------------------------------------------------------------------------
-- Variables declaration fragment inserted from UDFSCA_SQL_VAR.FRAGMENT
------------------------------------------------------------------------
P1: BEGIN
-- Declare variables
DECLARE SQLSTATE CHAR(5) DEFAULT '00000';
DECLARE SQLCODE INT DEFAULT 0;
-- Declare cursor
DECLARE cursor1 CURSOR FOR
SELECT EMPLOYEENUMBER, FIRSTNAME, JOBTITLE, LASTNAME, OFFICECODE
FROM EMPLOYEES
WHERE OFFICECODE = offcode;
-- Declare handler
DECLARE EXIT HANDLER FOR SQLEXCEPTION
SELECT SQLSTATE, SQLCODE INTO SQLSTATE_OUT, SQLCODE_OUT
FROM SYSIBM.SYSDUMMY1;
-- Cursor left open for client application
OPEN cursor1;
SET SQLSTATE_OUT = SQLSTATE;
SET SQLCODE_OUT = SQLCODE;
END P1
Comment