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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Problem with UTL_FILE.FOPEN 'append' option

Re: Problem with UTL_FILE.FOPEN 'append' option

From: Jining Han <hanj_at_mailcity.com>
Date: Thu, 01 Feb 2001 17:39:28 GMT
Message-ID: <95c70f$vrh$1@nnrp1.deja.com>

In article <95bm9e$fqp$1_at_nnrp1.deja.com>,   monsri_at_my-deja.com wrote:
> Hello,
>
> I've written the following stuff to write files on the
> server side:
>
> > Procedure test
> > IS
> > DEF_EXPORT_DIR varchar2(30) :='/cce/myLogin';
> > F_NAME varchar2(30) ;
> > F_XML UTL_FILE.FILE_TYPE;
> > REF_NAME varchar2(30) :='TEST';
> > pout_RC number;
> > BEGIN
> > F_NAME:='myFile.xml';
> > dbms_output.put_line('before OPEN');
> > F_XML :=UTL_FILE.FOPEN(DEF_EXPORT_DIR, F_NAME, 'a');
> > dbms_output.put_line('after OPEN');
> > UTL_FILE.PUT_LINE(F_XML, 'Hello world');
> > dbms_output.put_line('after PUT LINE');
> > UTL_FILE.FCLOSE(F_XML);
> > dbms_output.put_line('after FCLOSE');
> > EXCEPTION
> > [here follow my exceptions...]
> >
> > END test;
>
> If the file myFile.xml already exists, no trouble, but when
> myFile.xml still DOES NOT exist in /cce/myLogin, I get the
> following error: UTL_FILE.INVALID_OPERATION ("the file could
> not be opened or operated on as requested").
>
> At the OS level, here is what we got: the login 'oracle' has
> been added to an 'xml_export' group created for this very
> purpose (be able to write in /cce/myLogin). The Unix user
> 'myLogin' belongs to this 'xml_export' group, and the
> UTL_FILE_DIR parameter of my init.ora points to '/cce/myLogin'
> (myLogin's $HOME). This /cce/myLogin directory is in 777:
> > ls -ld /cce/myLogin
> > drwxrwxrwx 3 myLogin xml_export 512 Feb 1 11:19 /cce/myLogin
>
> Any further suggestions... ??
>
> Thanks a lot !
> Seb
>
> Sent via Deja.com
> http://www.deja.com/
>

Just curious: how do you append to an non-existing file?

--
Jining Han
Sallie Mae


Sent via Deja.com
http://www.deja.com/
Received on Thu Feb 01 2001 - 11:39:28 CST

Original text of this message

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