It sounds to me like the file isn't being closed after the original open input which would cause the open output to fail. Please trace through your code and make sure that the close statement for that file is being done properly. Since open output requires exclusive access to the file the file cannot be open by the same or any other process at the time the open output occurs.
↧