cancel
Showing results for 
Search instead for 
Did you mean: 

File Adapter Overwriting the output files

Former Member
0 Kudos

Hi All,

I´m using a File Receiver Adapter to write flat files on to an FTP. Same Communication Channel is used for all types of output files (As per the business requirement the file name(

MzOutput.txt

) shud b same for Deliverz orders, Purchase orders etc...). The receiver legacz szstem reads one file at atime and deletes it. So if i´m writing a Deliverz Order File, i have to wait until the file

MzOutput.txt

gets deleted and then i have to write the next file using the same name. in order to acheive this, i had used a module processor which waits until that

MzOutput.txt

gets deleted. Mz problem is

As there are ´n´ no of orders waiting in the queue, if at 12:14:00 the

MzOutput.txt

gets deleted, then two threads which check for the existance of the

MzOutput.txt

file finds nothing and tries to write at same time. as a result, first file got overwritten by the second file.
I dint check the indicator

OverwriteExisting File

in the CC configuration.

If i use two different CC channels to write the same file, it is giving FTP Exception which is true.

I´m loosing few deliveries as a result of the above case. Can anzone please help me out in this regard?

Thnx in Advance

Anil

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anil,

Why dont you write the files with 'Add time stamp' option on for the file name and then the third party/legacy system to read the files in the order which they were created.?

Another option will be to write these files into a folder with these Add time stamp option/counter option and make a shell script check the folder for the MzOutput.txt file exists in the folder from where the third party/legacy system reads the file and once it has deleted the existing file, then ur files shud be moved in the order in which they were written n the temporary folder.

This will avoid the queue of messages in the adapter engine.

Cheers

JK

Former Member
0 Kudos

Hi krishnan,

I had already written a java application which does the same thing that u had mentioned. but that was not accepted by the client saying that it is not standard process of transfering files from one location to another location with in their network.

Any clue?

Anil