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

Home -> Community -> Usenet -> c.d.o.server -> Debug message in file

Debug message in file

From: Jérôme Perruchas <jpsplus_at_ifrance.com>
Date: Fri, 18 Aug 2000 10:58:51 +0100
Message-ID: <8niubp$c04$1@reader1.fr.uu.net>

Hi,

I'm on NT4 with Oracle 8.0.6

When I execute a procedure, I want to know different the value from a variable.
I tried to use the package dbms_output but as I have many values, I would like to put them in a file instead of displaying them on the screen. I know that the package utl_file can do that but when I use it, I have an error.
Here my procedure :

create procedure jp.detest is
i integer;
fich utl_file.file_type ;

begin
  fich:=utl_file.fopen('c:\','debug.txt','w');   i:=1;
  utl_file.put_line(fich,'first value i : '|| to_char(i));   i:=3;
  utl_file.put_line(fich,'second value i : '|| to_char(i));   utl_file.fclose(fich);
end;

This is the error :

SQLWKS> execute jp.detest ;

ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 88
ORA-06512: at "SYS.UTL_FILE", line 146
ORA-06512: at "JP.DETEST", line 6
ORA-06512: at line 2

Anybody have a solution ?

thanks Received on Fri Aug 18 2000 - 04:58:51 CDT

Original text of this message

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