Re: Full PL/SQL Programs

From: Don Vick <dvick_at_lanier.com>
Date: Fri, 24 Mar 1995 14:45:51 GMT
Message-ID: <D5y90G.7K6_at_lanier.com>


In article <1995Mar24.004046.22795_at_biosym.com>, Alan H. Rosenthal <ahr_at_biosym.com> wrote:
>
>I have rtfm'ed and I can not find an example of a full PL/SQL
>2.0 program that runs in the SQL*PLUS environment. Specifically,
>I want to be able to write a program that consists of a single
>main routine and a few procedures and functions.
>
>Can you write such a program?????
>
Try this in SQL*Plus:

variable one number;               <--- SQL*Plus commands
variable two varchar2(20);         <--- SQL*Plus commands
begin		  <--- anonymous block to enclose the whole PL/SQL pgm
declare
procedure xyz is <--- nest procedure declaration within main block begin
:one := 1;
end xyz;
begin <--- begin body of main block :two := '2';
xyz;
end;              <--- end PL/SQL program
end;              <--- end enclosing anonymous block
/
print one         <--- SQL*Plus commands
print two         <--- SQL*Plus commands

--------------------------------------------------------
Donald E. Vick (dvick_at_lanier.com, dvick_at_crl.com) Voice: (404) 493-2194 Fax: (404) 493-2399 Received on Fri Mar 24 1995 - 15:45:51 CET

Original text of this message