If you examine examples closer, you can see that nested table used in conjunction with cursor()
function. E.g.
static const text *nst_tab = (text *)
"SELECT last_name, CURSOR(SELECT department_name, location_id \
FROM departments) FROM employees WHERE last_name = 'FORD'";
where key part for your question is
CURSOR(SELECT department_name, location_id FROM departments)
where departments
is a nested table.
So if you need to use nested table as a cursor you need to select
from it and convert to cursor type.
In case of PL/SQL collection variable, if her record's type defined on database schema level you can cast it to a table and afterward select from it to get a cursor:
declare
vMyTable TMyTableType;
vCursor sys_refcursor;
begin
-- populate table with values ...
open vCursor for (
select * from table(vMyTable);
);
:OutCursorParameter := vCursor;
end;