Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: problem with utl_f***.put :-((
Hi,
On Wed, 14 Jul 1999 14:00:05 GMT, juhu2_at_my-deja.com wrote:
>Hi,
>
>we work on RDBMS 8.04 and I have the following problem with the utl_file
>package: I want to write a DTAZV file (CR/LF forbidden!!). So I can't
>use utl_file.put_line. Instead I tried utl_file.put. I'm aware of the
>1023 bufsiz Problem, so the procedure below works with 1023 Bytes
>chunks. Executing that stuff fails with "write_error". But when I
>replace utl_file.put with utl_file.put_line all works nice!!!!
>So my guess is that I simply can't write files without CR/LF :-((
>
this is a standard problem in all rdbms releases. The utl_file implementation cannot write without LF - no chance. But you can try to use a pipe instead of the outputfile and write a little program which read out the pipe, eliminate the LF and write into the right file. So you can avoid all problems with utl_file (max. line length, LF,...).
If you often need to process information out of the database, implement a "listener" for such kind of work which read a named unix pipe. Implement some functionality to process unix commands, write files and so on. Implement also a package in pl/sql to communicate with this listener. We have done it this way and it works very stable and fast, even the pipesrv/pipechld software is no longer needed - and we can restrict the commands which can be executed!.
___
Fred Stojentin
Received on Thu Jul 15 1999 - 07:23:28 CDT