cancel
Showing results for 
Search instead for 
Did you mean: 

How to check whether a file is written completly or not to folder

Former Member
0 Kudos

Hi All,

i have requirement like this.

Gentran will write the file into one folder with the name "abc.txt" and XI also needs to write the file to same folder with same file Name and it will be appended to the file written by Gentran because of same file name(abc.txt)

upto this it is okay , XI can do this append to already existed file

But While Gentran is writing the file, XI should not write. Until and unless the file is written by Gentran XI should not write (Append) the file.

How can i achieve this functionality

Regards

Vamsi

Accepted Solutions (1)

Accepted Solutions (1)

samiullah_qureshi
Active Contributor
0 Kudos

I guess, XI will not be able to edit the file while Gentran will be writing to the file, as there must be some locking set to the file by OS or ftp.

If such lock will be set on the file then your file adapter may throw the error.

Edited by: Samiullah Qureshi on Jun 26, 2009 9:29 AM

Answers (3)

Answers (3)

Former Member
0 Kudos

Solution is fixed by top level management like, i need to send the file to Gentran then gentran will combine and sent to to target system

JoelTrinidade
Active Contributor
0 Kudos

Hi Vamsi,

Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .

In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.

The file adapter will wait for its turn and then write the files.

Regards

joel

Edited by: joel trinidade on Jun 26, 2009 11:06 AM

former_member200962
Active Contributor
0 Kudos

Think this functionality will be taken care-off by the file properties....just share a folder with your friend and put a file in it....and then both try to modify the file at the same time.....it will give some error....so when 1st application is writing the file...2nd will have to wait until the file is saved successfully by the first application (vice-versa is also possible)......

File adapter wont give an error then and there itself...it will try for 3 times (default)...before terming it as an error.....correct me if wrong...

Regards,

Abhishek.