Home » SQL & PL/SQL » SQL & PL/SQL » Truncating the content of a file
icon5.gif  Truncating the content of a file [message #159173] Thu, 16 February 2006 08:47 Go to next message
madchaz
Messages: 65
Registered: October 2005
Member
I'm writing a report that will be automatically executed at fixed intervals. The report will be called by a cron job under using, using the applmgr username.

In the course of the report, I am writing 5 files down to the file system in /tmp

The issue I have is that, in testing, I end up with the files not getting truncated when I rewrite to them. The applmgr user does not have the needed access to do anything but read the files. I need to be able to empty the files before my procedures start. I'm just not sure how ...
Re: Truncating the content of a file [message #189595 is a reply to message #159173] Fri, 25 August 2006 03:30 Go to previous messageGo to next message
kimant
Messages: 201
Registered: August 2006
Location: Denmark
Senior Member
Hi

I suspect You call a shell script from Your crontab.
Why not just delete the file from that script?

Br
Kim
Re: Truncating the content of a file [message #189604 is a reply to message #159173] Fri, 25 August 2006 04:03 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
If you use UTL_FILE, just make sure you open the file in mode W - this will truncate any existing file of that name.
Previous Topic: Table pratitioning
Next Topic: Invalid Batch Value Exception...
Goto Forum:
  


Current Time: Sun Dec 04 04:28:32 CST 2016

Total time taken to generate the page: 0.11196 seconds