CREATE OR REPLACE PACKAGE MYPACKAGE AS
TYPE MY_CURSOR IS REF CURSOR;
end MYPACKAGE;
create or replace procedure getcur(p_rc out MYPACKAGE.MY_CURSOR)
is
begin
open p_rc for 'select * from med_users';
end getcur;
declare
med_userss acs.mypackage.MY_CURSOR;
v_row acs.med_users%ROWTYPE;
begin
getcur(med_userss);
loop
FETCH med_userss into v_row;
EXIT WHEN med_userss%NOTFOUND;
dbms_output.put_line(v_row.login_name);
end loop;
end;