|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Reading text files from Broker |
« View previous topic :: View next topic » |
Author |
Message
|
cloucas |
Posted: Wed Jan 10, 2007 4:13 am Post subject: Reading text files from Broker |
|
|
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 |
|
 |
jefflowrey |
Posted: Wed Jan 10, 2007 4:17 am Post subject: |
|
|
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 |
|
 |
ashoon |
Posted: Wed Jan 10, 2007 7:57 am Post subject: how-to read text files into the broker |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|