Problem with UTL_FILE.FOPEN 'append' option

From: <monsri_at_my-deja.com>
Date: Thu, 01 Feb 2001 12:55:36 GMT
Message-ID: <95bmc5$ft6$1_at_nnrp1.deja.com>


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/ Received on Thu Feb 01 2001 - 13:55:36 CET

Original text of this message