Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get data from MQ to a flat file

Status
Not open for further replies.

chiqid

IS-IT--Management
Jun 6, 2001
5
US
We are very new to MQSeries. We have our connection set up and we have received data from the other side. Now, we want to get that data out of the queue and into a flat .txt file for upload to our mainframe. We tried this and the .txt file looks like it is still in MQ format. I would love to talk with someone about this!
Clair Davey
 
Hi!

Can you give a little more detail of your setup?
When you say you have received data from the 'other side' what are the sides?
How do you process the message? Do you just attempt to 'send' the message to a TXT file?

 
Hello winzip,
Thanks for replying. Here is our setup:
We have MQSeries (ver 5.1) running on Sun Solaris. This is the middle platform between two mainframe systems. One system is MVS, they have transmitted data to our solaris box. We are trying to get this data from the solaris box MQ into a flat .txt file to ftp up to our mainframe (VSE) to a plain esds file. Is this enough information?
 
You're going to need a bridge to interface with MQ and get the message from the queue and write it out as a flat file. You could use java or any other language native to VSE.
 
Hi!

neo5gen is right. it is not enough that you can send/receive messages from one platform to the other. what you need is a program that will process the message that was received in whatever manner you choose; like writing it out to a file then FTPing it.

your processing program can be any (VB, Cobol, Java, etc) that can interface with MQ.

regards.
 
Guys..

why is this looking complicated?
or may b I didn't get the prob correctly.

You wil have a listener at the receiving end who listens to your queue and get the message outside. Once that's done, ie., once you have the actual data in your hands, it's up to you how to handle it from then onwards. In short, you will probably have another module which when gets a string message (you will pass your message to this module), will write that into a flat file in the format you require. To be frank, I don't see a problem in this and sounds very straight forward too.

If am wrong anywhere, please enlighten me on this and may be I can help you more..

regards
MNS lecMns
B'lore
 
Well, I guess it all looks complicated to me because, like I said, we are new to MQSeries. We decided to use cobol on our mainframe to reformat the data...I hope it works going back the other way. If we do an mqput from the solaris side of a flat .txt file with data only, will it go into MQ in the right format to be transmitted to the other mainframe?
 
i know how you feel, chiqid. it can be confusing even with help. note that what you've received so far in terms of responses to your query all say the same thing. look at it this way (and let us use your terms):

first thing to remember: you decide on a message format

then,

side A has a module that formats the message, then puts it in the queue (MQPUT);

the message gets sent,

side B has a module that retrieves the message from the queue (MQGET), then parses the message according to the known format;

side B may then decide to respond;

using the same module or calling (invoking, starting, initiating, whatever way is known to side B) an entirely different module that formats the message and puts it in the queue (MQPUT);

the response gets sent,

side A retrievs the message and parses it according to the known format... and so on and so forth

NOTE that the key is the message format that each side understands, knows how to format and therefore also knows how to parse

whatever type of module you use, COBOL, VisualBasic, Java, etc. is rendered immaterial

THAT IS precisely the kind of advantage that MQ Series is supposed to give you - platform independence and language independence as well

regards...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top