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 » General IBM MQ Support » Polling a directory

Post new topic  Reply to topic
 Polling a directory « View previous topic :: View next topic » 
Author Message
anilit99
PostPosted: Thu Aug 05, 2010 2:18 am    Post subject: Polling a directory Reply with quote

Voyager

Joined: 28 May 2009
Posts: 75
Location: London, UK

I think I am trying to re-inventing the wheel here. But here is the deal,

1. Have a directory full of xml files (with different names)

2. Need something to poll the directory every 2 secs or so, and put them in a queue and delete/archive the files after that.

3. Peace.

I believe WMB does give you that functionality. But unfortunately we are not in a position to buy that product(time and money constraints, lets say ! ).
I am running MQ 7.01 on Windows. Is there any way, I can reach step 3 without shelling out a lot of money ?

cheers
Anil.
_________________
"I almost care !"
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Aug 05, 2010 2:55 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Look at the free open source Capitalware file mover

http://www.capitalware.biz/open_source.html

Look at the Q program (free support pac) MA01

http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24000647&loc=en_US&cs=utf-8&lang=en
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Thu Aug 05, 2010 2:57 am    Post subject: Re: Polling a directory Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

anilit99 wrote:
1. Have a directory full of xml files (with different names)

2. Need something to poll the directory every 2 secs or so, and put them in a queue and delete/archive the files after that.


when in your directory there are lots of xml files, then whats the criteria to put them in a queue ?
Do you want all of'em to be put in a queue in one shot and make the directory empty by deleting/archiving ? and whenever new one comes up then put it again ?
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
anilit99
PostPosted: Thu Aug 05, 2010 3:19 am    Post subject: Reply with quote

Voyager

Joined: 28 May 2009
Posts: 75
Location: London, UK

Quote:

Look at the free open source Capitalware file mover

http://www.capitalware.biz/open_source.html

Look at the Q program (free support pac) MA01

http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24000647&loc=en_US&cs=utf-8&lang=en

@Zpat: thanks for the pointers, the MQFM from CapitalWare looks very good. I tried MA01 pac already, but looks no good to me. The documentation doesnt clearly say much about file inputs.


Quote:

when in your directory there are lots of xml files, then whats the criteria to put them in a queue ?
Do you want all of'em to be put in a queue in one shot and make the directory empty by deleting/archiving ? and whenever new one comes up then put it again ?

@shashivarungupta: There is no criteria as such. I just need all the files as individual messages in the queue. And this is not one off a thing, files do come in regularly, so I need to poll that directory as well.

cheers
Anil
_________________
"I almost care !"
Back to top
View user's profile Send private message
harish_td
PostPosted: Fri Aug 06, 2010 4:15 am    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

anilit99 wrote:
The documentation doesnt clearly say much about file inputs.

Code:

-F[+]<filename>
          Input/output file.
          Entire file will be put to the output queue as a single message.

You could put together a script like this to recursively call the ma01 support pac to put files to your queue
Code:

ls *.xml | while read fileNames;
do echo q -o OUTPUT-QUEUE -m QUEUE-MANAGER -F $fileNames;
q -o OUTPUT-QUEUE -m QUEUE-MANAGER -F $fileNames;
done


Using the above hack with the incron could be the answer
http://freshmeat.net/projects/incron/
Back to top
View user's profile Send private message Yahoo Messenger
anilit99
PostPosted: Fri Aug 06, 2010 4:57 am    Post subject: Reply with quote

Voyager

Joined: 28 May 2009
Posts: 75
Location: London, UK

thanks harish_td !!

I am working in windows environment, but I got the idea though !

cheers
Anil.
_________________
"I almost care !"
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Fri Aug 06, 2010 8:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

anilit99 wrote:
the MQFM from CapitalWare looks very good.

MQFM should do exactly what you want. Simply use the 'Watch' action. You can set the Poll Interval to any value that is greater than 5 seconds (less than 5 seconds may cause too much IO).

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Polling a directory
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.