Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Pausing inside a cursor

Re: Pausing inside a cursor

From: fredericks <free101_at_picusnet.com>
Date: Tue, 23 Feb 1999 22:59:35 -0500
Message-ID: <36d3787d.0@news.itribe.net>


Jim

(assuming you are working from sqlplus...)

Bad news - you can't get there from plsql.

PAUSE is a SQLPlus command. It cannot be activated in PLSQL. It can pause between separate SQL commands or PLSQL blocks, but -- not to my knowledge -- from inside a plsql block.

I do not believe that there is any method for PLSQL to pause for user input.

You could call a C program to effect a pause, from PLSQL - but doing this is not very easy.

Worse then that, dbms_ouput is not synchronous. It takes the put and put_line text and places the text into a buffer. The buffer is emptied by the SQLPLUS interface AFTER plsql is terminated... after the end of the block or procedure.

In the Oracle Forms environment, there are ways to pause, from within PLSQL,
display a message, get user input etc. But even if you have the forms tool ready to go,
there are a few steps to learn in order to make a simple form to do what you want.

I wish I could offer a solution.
I'll try to watch for other responses to see if anyone else offers something I do not know about.

Regrets

Mark

jrsmith_at_netwave.net wrote in message <7av44t$ij$1_at_nnrp1.dejanews.com>...
>>I have a cursor:
>
>DECLARE
> CURSOR c IS SELECT...;
> v c%ROWTYPE;
>BEGIN
> OPEN...
> LOOP
> FETCH... etc...
> EXIT WHEN...
> DBMS_OUTPUT.PUT_LINE(zzyzz)...
> ...
> [ and I want to prompt for return here regardless of page size ]
> --DO OTHER THINGS...
> ...
> END LOOP;
> CLOSE...
>END;
>
>How do I get this script to pause inside the loop regardless of
>linecount? When I put in:
>
> PAUSE Strike return...;
>
>It rags that it's looking for a token or an assignment operator.
>When I remove the pause, the app runs cleanly but scrolls by faster
>than the user can appreciate.
>
Received on Tue Feb 23 1999 - 21:59:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US