Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DBMS_OUTPUT.PUT_LINE problem.

1,450 views
Skip to first unread message

Vidya

unread,
Jan 7, 2008, 2:26:04 PM1/7/08
to
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

fitzj...@cox.net

unread,
Jan 7, 2008, 4:48:53 PM1/7/08
to

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

William Robertson

unread,
Jan 8, 2008, 3:27:38 AM1/8/08
to

btw this is one of the advantages of formatting your code - this type
of thing would leap out at you. It's much harder to spot in a random
jumble.

Robert Klemme

unread,
Jan 10, 2008, 10:31:13 AM1/10/08
to
On 8 Jan., 09:27, William Robertson <williamr2...@googlemail.com>
wrote:

> btw this is one of the advantages of formatting your code - this type
> of thing would leap out at you. It's much harder to spot in a random
> jumble.

And it's pretty easy, there are even formatters on the web that work
well for small amounts of code:

http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm
http://www.orafaq.com/utilities/sqlformatter.htm

Cheers

robert

Vidya

unread,
Jan 11, 2008, 10:17:41 PM1/11/08
to
Thanks to all of you, for your input.
Best Regards,
Vidya
0 new messages