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: <jrsmith_at_netwave.net>
Date: Wed, 24 Feb 1999 18:34:54 GMT
Message-ID: <7b1goe$22m$1@nnrp1.dejanews.com>


Fredericks,

Actually, telling me how PL/SQL handles the blocks and buffering is a big enough clue to let me know what I gotta' do to make it work. Many thanks.

Best regards,
Jim Smith

In article <36d3787d.0_at_news.itribe.net>,   "fredericks" <free101_at_picusnet.com> wrote:
> 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.
> >
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Feb 24 1999 - 12:34:54 CST

Original text of this message

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