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 » Reading Multiple file

Post new topic  Reply to topic
 Reading Multiple file « View previous topic :: View next topic » 
Author Message
wbimb
PostPosted: Mon Feb 20, 2012 2:05 am    Post subject: Reading Multiple file Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

Hi

I have WebSphere Message Broker V6.1

I need to read 2 files one after another

First file is a.csv After reading this file and processing it have to read another file a.txt

How do i acheive this using single flow

Or if i need another flow, then how do i see to it that file a.csv is read before a.txt Inspite of receiving a.txt first
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Mon Feb 20, 2012 2:36 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

Check out for example what can you do with Collector -node http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac37820_.htm

--
Marko
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Mon Feb 20, 2012 3:47 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/bc34090_.htm
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Mon Feb 20, 2012 4:00 am    Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi mqjeff,

Do you mean that OP should upgrade their broker version so that they could use FileRead node?



--
Marko
Back to top
View user's profile Send private message Visit poster's website
wbimb
PostPosted: Mon Feb 20, 2012 4:03 am    Post subject: Reading Multiple file Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

Hi

Collector node is used when we have to collect information from different sources.

But here a.csv and a.txt are not connected.

First a.csv needs to be processed and the messages should be placed on queue. After that a.txt needs to be processed and the messages should be placed on same queue.

Even if we receive a.txt first will have to wait for a.csv and process that first.

Also FileRead is there in v 7 and not there in V6.1
Back to top
View user's profile Send private message
kash3338
PostPosted: Mon Feb 20, 2012 4:15 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Use a Temp queue or DB to acheive this.
Back to top
View user's profile Send private message Send e-mail
wbimb
PostPosted: Mon Feb 20, 2012 4:25 am    Post subject: Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

How can i use Temp queue...

at any given time i need to read both the files at the same time and then

process it
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Feb 20, 2012 4:32 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You are trying to design your solution based on how the business process appears to be written, rather than on how the technology allows you to solve it.

Again, yes,
Quote:
OP should upgrade their broker version so that they could use FileRead node
. You have a requirement that is enabled in the newer level, therefore you have a requirement that justifies moving to the newer level!

And, because, really, v6.1 is now two active versions behind current.

Collector node will not allow you to wait for a.csv to arrive before you process a.txt. You will construct a flow with TWO file Inputs, one for a.csv and one for a.txt. Collector node will allow you to OUTPUT the contents of a.csv before you OUTPUT the contents of a.txt, but not wait for the arrival of a.csv before you READ a.txt.

The only way to achieve that is with FileRead node. Or your own code that does the same thing as FileRead node, using some kind of node that supports a programming language that has I/O operations, which ESQL *does not have*.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 20, 2012 4:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

wbimb wrote:
How can i use Temp queue...

at any given time i need to read both the files at the same time and then

process it


Best bet is to use a feeder program that correlates the records and feeds both records as an atomic transaction to the broker...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
wbimb
PostPosted: Tue Feb 21, 2012 8:23 pm    Post subject: Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

Is it possible to have 2 flows

One reads a.csv and processes it. After it is done the processing it will call the second flow which reads a.txt and does the processing

Note: Even if a.txt is received first the flow which reads a.csv should start first

Can this be achieved
Back to top
View user's profile Send private message
vishnurajnr
PostPosted: Wed Feb 22, 2012 12:26 am    Post subject: Reply with quote

Centurion

Joined: 08 Aug 2011
Posts: 134
Location: Trivandrum

1.Read the files (both CSV and TXT) using same input.
2.Route it based on file name
3. For TXT--store it in a Queue (temp) or DB.
4.For CSV, finish your processing and after process the TXT from DB or MQGET node. (if it is from DB, delete it after successfully processing)
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Wed Feb 22, 2012 3:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

wbimb wrote:
Is it possible to have 2 flows

One reads a.csv and processes it. After it is done the processing it will call the second flow which reads a.txt and does the processing

Note: Even if a.txt is received first the flow which reads a.csv should start first

Can this be achieved


YES.

YOU CAN DO EXACTLY THIS USING FILEREAD NODE IN V7.

You cannot do this without a FileRead node in v6.1.

Unless you choose to write a JavaCompute node that does the same thing as a FileRead node.
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 » Reading Multiple file
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.