Home » Developer & Programmer » Forms » Destroying Text files after use
Destroying Text files after use [message #198117] Sun, 15 October 2006 02:30 Go to next message
rahshar
Messages: 26
Registered: July 2006
Location: Oman
Junior Member
I have a situation,

I am capturing telephone call records made through a third party program. This program creates entries in text format, and the file is open always.

I transfer the data to an oracle table through TEXT.IO.

I need to dicard the file contents so that I start fresh records again. or I need to delete it from the folder, but the oracle is raising an error because the text file is in use.

The Open with 'W' option should clear the contents and start fresh, but it isn't happening.

Has any one tried this before

Thanks and Regards
Re: Destroying Text files after use [message #198175 is a reply to message #198117] Mon, 16 October 2006 00:35 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I think that you are going to have a problem because I don't think you can do much without 'closing' the file.

I was going to suggest using the 'fcopy' option of 'utl_file' to copy the existing file and then 'frename' to put a new empty file 'under' the 'third party program'. But you can't quarantee that the 'third party program' doesn't write a 'line' between these two commands.

A PABX recording system with which I previously worked had the option to 'swap' output files. For most of the time it would use the 'a' output file and at a command it would swap to the 'b' output file. We could then process the 'a' or 'b' file.

Does your softare have this option? Have you asked the supplier how other organisations are processing the output file?

David
Re: Destroying Text files after use [message #198224 is a reply to message #198175] Mon, 16 October 2006 04:03 Go to previous message
rahshar
Messages: 26
Registered: July 2006
Location: Oman
Junior Member
Thanks a lot I'll give it a try
Previous Topic: Changing default order by and where of a block based on stored Proc
Next Topic: what is wrong with this code
Goto Forum:
  


Current Time: Fri Sep 20 13:42:54 CDT 2024