I got it. Here is the new sproc i created to test with. Below the sproc i have pasted the PL/SQL block of code that is saved when you right click and "Run" the sproc. When you click ok after you modify the PL/SQL block window with the code below you click "OK" and it will display the records. You will have to create the table and columns and populate the rows sorry i didn't have time to create that script. Wow so much work just to execute a sproc makes you appreciate management studio. =)
CREATE OR REPLACE
PROCEDURE test_GET_UNPROCESSED_SETREQ2 (vInstance IN pmcs_setreq_out.instance%type,retval out sys_refcursor )AS
BEGIN
open retval for
select pmcs_seq,instance
from pmcs_setreq_out where pmcs_processed = 0 and instance = vInstance order by pmcs_seq;
EXCEPTION
WHEN no_data_found THEN
NULL;
END test_GET_UNPROCESSED_SETREQ2;
--------------------------
DECLARE
VINSTANCE CHAR(1);
RETVAL sys_refcursor;
v_a number;
v_b char(1);
BEGIN
VINSTANCE := 'b';
TEST_GET_UNPROCESSED_SETREQ2(
VINSTANCE => VINSTANCE,
RETVAL => RETVAL
);
-- Modify the code to output the variable
-- DBMS_OUTPUT.PUT_LINE('RETVAL = ' || RETVAL);
LOOP
FETCH RETVAL INTO v_a, v_b;
EXIT WHEN RETVAL%NOTFOUND;
dbms_output.put_line(v_a || 'col2' || v_b);
END LOOP;
CLOSE RETVAL;
END;