ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » FileInput Node - File lock

Post new topic  Reply to topic
 FileInput Node - File lock « View previous topic :: View next topic » 
Author Message
johkar
PostPosted: Mon Jul 10, 2017 5:53 pm    Post subject: FileInput Node - File lock Reply with quote

Novice

Joined: 27 Jan 2015
Posts: 16

I'm trying to understand when the FileInput node will start processing a file and am not finding definitive documentation. Is it upon the transferring agent to maintain a file lock until the file is fully written? Does the FileInput node wait until it can get a file lock if the record is the 'whole file'? If a file is FTPd to IIB should the agent transfer the file and then change permissions to where IIB can detect the file?

The gist is that I don't want the file to start processing until it is fully written and I'm looking for the best practice.

We are on IIB 10. Thanks.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Jul 10, 2017 10:43 pm    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

Good news and bad news.

The filenodes will use locks on the files.

Most other applications don't use file locks, as on the zany Unix OS - it is not the default.

Safest way is to transfer and rename in FTP (SFTP) and then use IIB masking to detect the final name
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 11, 2017 4:58 am    Post subject: Re: FileInput Node - File lock Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

johkar wrote:
I'm trying to understand when the FileInput node will start processing a file and am not finding definitive documentation.


Because it's using OS level functions, so as to be platform independent.

johkar wrote:
Is it upon the transferring agent to maintain a file lock until the file is fully written?


Yes. Most transferring agents (and to my knowledge all FTP agents) don't bother to do so.

johkar wrote:
Does the FileInput node wait until it can get a file lock if the record is the 'whole file'?


It waits until it can get a file lock for any type of file, not just 'whole file'. All processed files are moved from the polled directory to the mqsitransitin directory to be actually processed, so the FileInput node needs enough access to the file to be able to move it to that directory. In most instances (as described above) it can get that access if the transfer is complete or not.

johkar wrote:
If a file is FTPd to IIB should the agent transfer the file and then change permissions to where IIB can detect the file?


Or FTP it to a different directory and move it once it's been completed.

johkar wrote:
The gist is that I don't want the file to start processing until it is fully written and I'm looking for the best practice.


No one ever does.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
johkar
PostPosted: Tue Jul 11, 2017 5:43 am    Post subject: Reply with quote

Novice

Joined: 27 Jan 2015
Posts: 16

Sounds good. I just wanted to make sure I wasn't missing some documentation. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » FileInput Node - File lock
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.