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 question

Post new topic  Reply to topic
 Fileinput node question « View previous topic :: View next topic » 
Author Message
assubct
PostPosted: Wed May 14, 2008 6:40 am    Post subject: Fileinput node question Reply with quote

Newbie

Joined: 15 Sep 2004
Posts: 8

Hi all,
I need to process files in a logical order.
Someone know what's the order of file processing on fileinput node?
Is it based on file name or in file timestamp?
I'll appreciate any ideas on how to solve that.
Thanks!
Back to top
View user's profile Send private message MSN Messenger
Gaya3
PostPosted: Wed May 14, 2008 8:05 pm    Post subject: Re: Fileinput node question Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

assubct wrote:
I need to process files in a logical order.
Someone know what's the order of file processing on fileinput node?
Is it based on file name or in file timestamp?


you can specify file name patterns, as its supported by MB V6.1
say gaya*.cfg, where it process the files with cfg suffix and preffix of gaya. if it doesnt meet the criteria, it wont touch other files.

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed May 14, 2008 8:17 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

sequencing of processing for files or any specific order is not maintained by FileInput node... it simply picks them and put them in an internal directory and processes them..
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
mqpaul
PostPosted: Tue May 27, 2008 5:53 am    Post subject: FWIW, the FileInput node processes files by last modified Reply with quote

Acolyte

Joined: 14 Jan 2008
Posts: 66
Location: Hursley, UK

The FileInput node scans the input directory for file names matching the pattern property. It sorts the results in order of last modified time stamp, and starts processing the oldest first.

This information does not help you design flows, since the sequence will usually be disrupted. For example, if you have several instances of your input node, several files get processed in parallel. Early files may take more processing than later ones, so the first to start may not be the first to finish.

Even if there is only one instance, you still can't trust the processing sequence: while the FileInput node is processing a file, other processes may move files with older last modified dates into the input directory, and they will be processed on the next scan.

If you need to process file contents in some particular sequence, I think you will need to store them on intermediate storage (such as a database table, or write them all to one file), sort that into the desired sequence, and use the results in your flow.
_________________
Paul
Back to top
View user's profile Send private message
yaakovd
PostPosted: Tue May 27, 2008 7:03 am    Post subject: Reply with quote

Partisan

Joined: 20 Jan 2003
Posts: 319
Location: Israel

You can separate file reading from file processing (2 message flows).

Flow 1:
1. read files using fileinput node
2. set some MQMD field (e.g. priority) by your file name
3. send files to queue
3. send control message to other queue

Flow 2:
1. read control message
2. MQ Get by predefined MQMD field.

Other option - OS script (perl or other) that renames files according your logic to: {order sequence}.{orig name}.{MB input suffix}
_________________
Best regards.
Yaakov
SWG, IBM Commerce, Israel
Back to top
View user's profile Send private message Send e-mail
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 question
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.