Re: DBMS_OUTPUT.PUT_LINE problem.

From: <fitzjarrell_at_cox.net>
Date: Mon, 7 Jan 2008 13:48:53 -0800 (PST)
Message-ID: <ed280984-afe0-4d26-8917-3e18e1e66832@41g2000hsy.googlegroups.com>


On Jan 7, 1:26 pm, Vidya <vmsw..._at_yahoo.com> wrote:
> Hi,
> I am trying to execute my newly created 'Login' stored procedure.
> For some reasons I get error on dbms_outout.put_line line code.  Can
> someone look into the block below and tell me what the problem
> is...?   Below is the version, code and error msg.  Any help is
> greatly appreciated.
>
> ---beginin of the code -----
> Connected to:
> Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
> With the Partitioning, OLAP and Oracle Data Mining options
> JServer Release 9.2.0.1.0 - Production
>
> SQL> SET SERVEROUTPUT ON
> SQL>
> SQL> declare
>   2   iid number;
>   3   PRSS number;
>   4    RETMES varchar2(200);
>   5     begin
>   6    WEB_GMX_MANAGEMENT.Login(
>   7    'vms',
>   8   '4111',
>   9    iid,
>  10    PRSS,
>  11    RETMES);
>  12     end;
>  13   DBMS_OUTPUT.PUT_LINE(iid);
>  14   DBMS_OUTPUT.PUT_LINE(PRSS);
>  15   DBMS_OUTPUT.PUT_LINE(RETMES);
>  16  /
>  DBMS_OUTPUT.PUT_LINE(iid);
>  *
> ERROR at line 13:
> ORA-06550: line 13, column 2:
> PLS-00103: Encountered the symbol "DBMS_OUTPUT"
> ORA-06550: line 13, column 27:
> PLS-00103: Encountered the symbol ";" when expecting one of the
> following:
> . ( , * % & - + / at mod rem <an identifier>
> <a double-quoted delimited-identifier> <an exponent (**)> as
> from into || bulk
> ORA-06550: line 15, column 30:
> PLS-00103: Encountered the symbol "end-of-file" when expecting one of
> the
> following:
> begin case declare end exception exit for goto if loop mod
> null pragma raise return select update while with
> <an identifier> <a double-quoted
>
> -- end of code-----
>
> Best Regards,
> Vidya

You've placed the DBMS_OUTUT code AFTER the end; for the block. It should be before:

declare
 iid number;
 PRSS number;
 RETMES varchar2(200);
   begin
  WEB_GMX_MANAGEMENT.Login(
  'vms',
  '4111',
   iid,
   PRSS,
  RETMES);

 DBMS_OUTPUT.PUT_LINE(iid);
 DBMS_OUTPUT.PUT_LINE(PRSS);
 DBMS_OUTPUT.PUT_LINE(RETMES);

end;
/

David Fitzjarrell Received on Mon Jan 07 2008 - 15:48:53 CST

Original text of this message