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: PL/SQL: Sending output to a text file possible ?

Re: PL/SQL: Sending output to a text file possible ?

From: Atif Ahmad Khan <aak2_at_Ra.MsState.Edu>
Date: 1997/04/17
Message-ID: <5j53ff$nef$1@NNTP.MsState.Edu>#1/1

Steve Phelan <stevep_at_pmcgettigan.demon.co.uk> writes:

> Are you using PL/SQL 2.3? And, if so, have you looked at UTL_FILE I/O
>package that comes with it?

Thanks for pointing to a very useful package. I tried it and ran into a small problem :

Here is my code :

DECLARE
        output_file UTL_FILE.FILE_TYPE ;   

   BEGIN

        output_file := UTL_FILE.FOPEN ('/opt/home/atif/SQL/', 'sales.txt', 'W') ;
        utl_file.fclose (output_file) ;

   END ; and here is the error I am getting. Using sqlplus to process it. I also made sure that utl_file_dir parameter had the right value.

BEGIN
*
ERROR at line 1:

ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "SYS.UTL_FILE", line 82
ORA-06512: at "SYS.UTL_FILE", line 120
ORA-06512: at line 5

I could be missing something very obvious. Its 7AM and I still haven't gone to sleep yet :)

I would appreciate any hints. Thanks

Atif Khan
aak2_at_ra.msstate.edu Received on Thu Apr 17 1997 - 00:00:00 CDT

Original text of this message

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