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 -> UTL_FILE.PUT_LINE doesnt work properly in 8i

UTL_FILE.PUT_LINE doesnt work properly in 8i

From: Rob Edgar <robedgar_at_mersey.com.hk>
Date: Sun, 9 May 1999 16:54:27 +0800
Message-ID: <7h3ieb$d923@news.hk.linkage.net>


I have been trying the UTL_FILE package in 8i using the new optional line size parameter in the FOPEN command.

It appears to me that when you open the file and specify a size only PUT will work PUT_LINE doesnt write anything to the file.

To test I ran this code
declare
  fileid UTL_FILE.FILE_TYPE := UTL_FILE.FOPEN ('D:\ORADBA\ADMIN\TT\UTL_FILE\', 'test.txt', 'W', 2000); BEGIN
  UTL_FILE.PUT_LINE(fileid,'Test Text');   UTL_FILE.FCLOSE (fileid);
EXCEPTION WHEN OTHERS THEN
  UTL_FILE.FCLOSE (fileid);
END; and you get an empty file.

Change the PUT_LINE to PUT and you get a file with the text PUT does work correctly and you can write very long strings out so this is a total disaster, at least there is a work around.

If you remove the line size parameter from FOPEN then PU_LINE does work and writes the string to the file.

Has anyone else found this or am I doing something wrong

Rob Edgar Received on Sun May 09 1999 - 03:54:27 CDT

Original text of this message

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