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 text files from Broker

Post new topic  Reply to topic
 Reading text files from Broker « View previous topic :: View next topic » 
Author Message
cloucas
PostPosted: Wed Jan 10, 2007 4:13 am    Post subject: Reading text files from Broker Reply with quote

Apprentice

Joined: 10 Mar 2006
Posts: 37

I have an application that sends messages as text files with one element per line and with the element name appearing before the value.

I need to use the broker to read these messages and change three of those element values before sending it off to another application.

What is the best way to treat this project? Is there a way to read and write from and to text files in the broker?

I enclose a sample message below:

#############################################################
# Insertion
#############################################################
ACTION "INS"

TBL FxSwapDeals
DealStatus V "Valid"
TradeDate 28/12/2006
Comments "Barclays WL"
SwapType R "Round"
Amount1Cur1 1000000
Amount1Cur2 -1492537.31
CapturedAmount 1 "Amount 1"
CapturedInterest 1 "Interest 1"
SpotRate 0.67
FarPts 250.0
ValueDate 28/12/2006
MaturityDate 28/03/2007
MaturityType S "Short-Term"
IsCLS N "No"
EOT



Users.Ref "DP"
Folders.Ref "MMFGSWPEXT"
Pairs.Ref "GBP/EUR"
Cpty.Ref "BARC___LDN"


EOR
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 10, 2007 4:17 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There is not, except I think on zOS, a presupplied FileInput or FileOutput node.

You can relatively easily write a Java Compute node to read from files, or write to files.

In general, it is better to write a standalone program that will read files and turn them into MQ Messages - or buy a program that will do this. You can consider using the MQ File Transfer Application that comes with MQ V6, but this is more for transfering files and less for loading files into queues.

Once you have the file data as a message (you could send it via HTTP instead of MQ if you wanted), you can then use MRM to parse this data. You can build this as a Tagged Delimited String message, where your elements are your tags and the fields are delimited by the line ending.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ashoon
PostPosted: Wed Jan 10, 2007 7:57 am    Post subject: how-to read text files into the broker Reply with quote

Master

Joined: 26 Oct 2004
Posts: 235

three options are:

- message broker file extender
- pm4data
- websphere TX

if you've already got a file movement utility (or happy with FTP) then use the broker file extender or TX - TX has more side benefits outside of just reading/writing files
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 text files from Broker
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.