I have stored procedure in DB2 for LUW which declares cursor with return and opens it.
CREATE PROCEDURE cursor_proc()
DECLARE cursor_var CURSOR WITH RETURN FOR SELECT col1 FROM tbl;
Then I want to insert data from this cursor into table in another procedure. How can I access to this cursor? Please advise.