Test script: How to pause at a breakpoint and look at a returned refcursor?

toddaron

Member
Hello!

(My) First post. Please be gentle!

v10.04.1708
Ora 11.2.0.2.0 64 bit

I'm trying to test all cases of a call. Nothing earth-shattering; nested loop, call to proc.

I'd like to step over the call and on return, examine the cursor for each call. I'm successfully doing the step, but when I select "View Collection Variable..." from the popup menu, no window opens.

When I run the thing with no loop, its fine, returns what I expect. But, in the loop, I'm getting:

(Rowcount = 0, %open, first iteration)

The called procedure builds some SQL and executes it, puts it into a nested array, massages it, and returns it as a ref cursor.

Again, the original, loop-less version works fine each and every. But, I'd like do this in a loop, rather than enter...

... each...

... and...

... every ...

... possiblevalue ... .

Help? Following is a culled approximation of the code.

declare
vID varchar2( 10 ) ;
vCursor sys_refcursor ;
begin
for i in
( select *
from MyView
)
loop
for j in 1 .. 3
loop
vID := case j
when 1 then 'Alabaster'
when 2 then 'Boise'
when 3 then 'Calamari'
end ;

TheSchema.ThePKG.TheProc(ocursor => vCursor
,p1=> i.KEYFIELD
,p2 => vID
);
-- Stop here after every call
end loop ;
end loop ;
end;
 
Back
Top