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 multiple wildcards

Post new topic  Reply to topic
 FileInput node multiple wildcards « View previous topic :: View next topic » 
Author Message
Laurens
PostPosted: Fri Sep 27, 2013 3:46 am    Post subject: FileInput node multiple wildcards Reply with quote

Apprentice

Joined: 01 Oct 2009
Posts: 35

dear Experts,

I'm trying to configure my FileInput node to read multiple patters.
Say *.txt and *.xml.
Can one configure more then one pattern on the file node ?

Otherwise I have to go through the hassle of multiple FileInputnodes.
FileRead node not possible because I'm reading from an ftp server.

Kind regards
Laurens
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Sep 27, 2013 3:54 am    Post subject: Re: FileInput node multiple wildcards Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Laurens wrote:
Otherwise I have to go through the hassle of multiple FileInputnodes.


Why is using more than one node a hassle? Can you not just drag the second node onto the canvas and connect the wires ? Why is it a big deal ?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
dogorsy
PostPosted: Fri Sep 27, 2013 4:01 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Quote:
Say *.txt and *.xml.
Can one configure more then one pattern on the file node ?

What does the documentation for the fileInput node say ?
Back to top
View user's profile Send private message
Laurens
PostPosted: Mon Sep 30, 2013 11:34 pm    Post subject: Reply with quote

Apprentice

Joined: 01 Oct 2009
Posts: 35

Well to answer the first question , the point is that for each additional filetype to be read one would only need to update a promoted property in the bar file.
While if I need to add a FileInput node on the canvas there is new coding + testing. The wildcard is not so much *.txt but rather FileName1*.txt FileName2*.txt

To answer number two , I was wondering just like the 'ls' or 'dir' there is a way to make the wildcard string so that you can have multiple constraints.
The documentation only states that a wildcard is possible , but it doesn't define in detail the possibilities of the wildcard.
Back to top
View user's profile Send private message
dogorsy
PostPosted: Mon Sep 30, 2013 11:56 pm    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Laurens wrote:
To answer number two , I was wondering just like the 'ls' or 'dir' there is a way to make the wildcard string so that you can have multiple constraints.
The documentation only states that a wildcard is possible , but it doesn't define in detail the possibilities of the wildcard.


Yes it does.
Quote:

In File name or pattern, specify a pattern for the file name. It is either a file name or a character sequence (a pattern) that matches a file name. A pattern is a sequence containing at least one of the following wildcard characters:
Wildcard character Description Example
* Any sequence of zero or more characters *.xml matches all file names with an xml extension
? Any single character f??????.csv matches all file names consisting of the letter f followed by six characters and then the sequence .csv.
For a file to be processed, its name must match the pattern.

If you specify a file name pattern that contains wildcard characters, the FileInput node copies the characters in the file name matched by wildcards, together with any intermediate characters, to the LocalEnvironment.Wildcard.WildcardMatch element. See File name patterns for more information.
Back to top
View user's profile Send private message
Tibor
PostPosted: Tue Oct 01, 2013 4:27 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

Perhaps, you can catch all the files (pattern='*'), then throw away the superfluous ones based on your own logic...
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Oct 01, 2013 4:32 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Laurens wrote:
Well to answer the first question , the point is that for each additional filetype to be read one would only need to update a promoted property in the bar file.
While if I need to add a FileInput node on the canvas there is new coding + testing. The wildcard is not so much *.txt but rather FileName1*.txt FileName2*.txt


It seems your design is fragile and apt to break. A properly designed flow would handle this gracefully without breakage.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
dogorsy
PostPosted: Tue Oct 01, 2013 5:48 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

Tibor wrote:
Perhaps, you can catch all the files (pattern='*'), then throw away the superfluous ones based on your own logic...

Really ?...
Back to top
View user's profile Send private message
Tibor
PostPosted: Tue Oct 01, 2013 5:51 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

@dogorsy: why not? I don't know how the file processing works there, so it would be a solution. (Besides, a smiley was inserted )
Back to top
View user's profile Send private message
dogorsy
PostPosted: Tue Oct 01, 2013 5:55 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

why not ?... maybe you should go and read how the fileinput node works. Files are in a directory for a good reason, you don't want them to be removed from it only because you cannot work out another way to deal with them.
Quote:
I don't know how the file processing works there

in that case, maybe you should not comment...
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 multiple wildcards
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.