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 -> Re: utl_file, long lines and Macs

Re: utl_file, long lines and Macs

From: Knut Talman <knut.talman_at_mytoys.de>
Date: Wed, 24 Apr 2002 14:49:05 +0200
Message-ID: <3CC6A9C1.9090505@mytoys.de>


> a quick question that I hope someone on the group can help with.
> I'm working on a procedure that runs an Oracle 8.1.7 on Windows 2000.
> It uses the utl_file package to write data in a CSV-format to a text file.
> This file is then processed by a software on a Macintosh.
> The problem is the line termination characters. On Windows this is linefeed
> and carriage return, whereas on the Mac it's just carriage return.
> Of course utl_file.put_line on the Windows server writes the Windows
> terminating characters to the file.
> Is there a way to set the character(s) that are written ?
> One solution we have come up with is to never call put_line (just call put)
> and append a linefeed where ever we need a new line.
> I think that this results in a huge buffer and what happens tho' if you're
> writing lots and lots of data out in this fashion ? (i.e. more than will
> fit in the buffer)

If the bufer is the problem you can flush it with

UTL_FILE.FFLUSH(file_handle);

The buffer will be written to disk. But you don't have to care about it, if the buffer is going to be full it'll be automatically written to disk and freed.

Regards,

Knut Received on Wed Apr 24 2002 - 07:49:05 CDT

Original text of this message

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