Author |
Message
|
chandu85 |
Posted: Mon Dec 05, 2011 8:04 am Post subject: Message = MQMD + MQRFH2 + DATA in MQ. |
|
|
Newbie
Joined: 28 Nov 2011 Posts: 7
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 05, 2011 8:31 am Post subject: Re: Message = MQMD + MQRFH2 + DATA in MQ. |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
chandu85 wrote: |
But I felt it was not described fully |
No, because it's talking about a different issue.
chandu85 wrote: |
Could someone please provide any URL |
Well the answers you got on your near-identical post here should provide some insight. Including the very valid of point not using an RFH2 at all if you're on WMQv7.
Also the product InfoCenter (link at the top of this page) describes all the headers. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
chandu85 |
Posted: Mon Dec 12, 2011 4:21 am Post subject: |
|
|
Newbie
Joined: 28 Nov 2011 Posts: 7
|
Hi Vitor,
We are connecting SystemA ( Mainframe ) and SystemB ( Small system , not Mainframe ). SysteB is developed in such way that whatever the data coming inside from SystemA using MQ should use MQRFH2 format ( Ofcourse, it is sucessful system definately they are using later MQV7 ).
I am Mainframe developer and new to MQ and XML, I read the Application Programming Reference document and still reading the document and some questions on how writte COBOL + CICS + MQ code that in such way that to PUT a data in MQ1 of SystemB and GET data from MQ2 of SysteB, Where MQ1 will accept data if the data in MQMD + MQRFH2 + DATA and same way GET MQ2 will have data in MQRFH2 format.
Example :
I would like to transfer data ( ABCDEFGHIJKLMN ) from SYSTEMA to SYSTEMB using MQs.
SYSTEMB says, data will be accepted through MQ. AND MQ should have MQMD and MQRFH2.
From MQ manuals I understood that data should be kept in a MQ's specified format then only data can be sent/receive from MQ's. The format is MQ DATA = HEADER + DATA
where HEADER = MQMD + MQRFH2
DATA = ABCDEFGHIJKLMN.( Correct me If I am wrong ).
Before calling MQPUT or MQGET, header fileds of MQMD and MQRFH2 fields should be papulated by the ( COBOL code ) program. ( Correct me if my wrong ).
Questions :
1. While I am reading the MQRFH2 header descriptions found a filed calld NameValueData , I do not understand what data should be kept in this filed.
2. Is 'NameValueData' field filled by program ( COBOL code ) before MQGET OR MQPUT.
3. Is XML code papulated using program ( using COBOL STRING,UNSTRING verbs etc ) and finally move to 'NameValueData' field of MQRFH2 header.
3. Is any relation between 'NameValueData' field and DATA = ABCDEFGHIJKLMN for this example. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 12, 2011 5:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
chandu85 wrote: |
We are connecting SystemA ( Mainframe ) and SystemB ( Small system , not Mainframe ). SysteB is developed in such way that whatever the data coming inside from SystemA using MQ should use MQRFH2 format ( Ofcourse, it is sucessful system definately they are using later MQV7 ). |
If they're using v7 you shouldn't be using an MQRFH2 but message properties. Unless your mainframe is still at v6. Which it shouldn't be.
chandu85 wrote: |
From MQ manuals I understood that data should be kept in a MQ's specified format then only data can be sent/receive from MQ's. The format is MQ DATA = HEADER + DATA
where HEADER = MQMD + MQRFH2
DATA = ABCDEFGHIJKLMN.( Correct me If I am wrong ). |
You're wrong. Data in the sense you describe is payload which WMQ has no prefredined format for. Try the manuals again.
chandu85 wrote: |
Before calling MQPUT or MQGET, header fileds of MQMD and MQRFH2 fields should be papulated by the ( COBOL code ) program. ( Correct me if my wrong ). |
Subject to the above comments about an RFH2 in v7, the RFH2 should be set up, the MQMD catered for. The queue manager will populate it for you but if you're using an RFH2 and/or a CICS header you have to handle that in the MQMD yourself.
chandu85 wrote: |
1. While I am reading the MQRFH2 header descriptions found a filed calld NameValueData , I do not understand what data should be kept in this filed. |
The data you wish/need to place in the RFH2.
chandu85 wrote: |
2. Is 'NameValueData' field filled by program ( COBOL code ) before MQGET OR MQPUT. |
.
It's filled before a put and populated by the get.
chandu85 wrote: |
3. Is XML code papulated using program ( using COBOL STRING,UNSTRING verbs etc ) and finally move to 'NameValueData' field of MQRFH2 header. |
I doubt it. It's XML like but not a document, and your payload doesn't sound much like XML either.
chandu85 wrote: |
3. Is any relation between 'NameValueData' field and DATA = ABCDEFGHIJKLMN for this example. |
I don't see one.
If SystemB is mandating the use of an RFH2, why not ask them what they expect in it? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
chandu85 |
Posted: Mon Dec 12, 2011 6:55 am Post subject: |
|
|
Newbie
Joined: 28 Nov 2011 Posts: 7
|
Hi Vitor,
Quote:
chandu85 wrote:
From MQ manuals I understood that data should be kept in a MQ's specified format then only data can be sent/receive from MQ's. The format is MQ DATA = HEADER + DATA
where HEADER = MQMD + MQRFH2
DATA = ABCDEFGHIJKLMN.( Correct me If I am wrong ).
Vitor Wrote
You're wrong. Data in the sense you describe is payload which WMQ has no prefredined format for. Try the manuals again.
I am searching for the meanig of PAYLOAD in Application Programming Reference document, but I am not. can you tell me the meaning of it ( I am learning the basics ).
may be I am missing something here,so written question in detail.
MQ MESSAGE = HEADER + DATA
where HEADER = MANDATATORY HEADER + OPTIONAL HEADERS , DATA = ABCDEFGHIJKLMN .
MANDATATORY HEADER = MQMD,OPTIONAL HEADER = MQRFH2 ( for my case ).
I will comeup with remaining points whichyou commented in the post.
Thanks for understanding Vitor. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 12, 2011 7:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
chandu85 wrote: |
From MQ manuals I understood that data should be kept in a MQ's specified format then only data can be sent/receive from MQ's. The format is MQ DATA = HEADER + DATA
where HEADER = MQMD + MQRFH2
DATA = ABCDEFGHIJKLMN.( Correct me If I am wrong ). |
Ok, in that sense I conceed it's a specified format in that it must be preceeded by at least the MQMD.
chandu85 wrote: |
I am searching for the meanig of PAYLOAD in Application Programming Reference document, but I am not. can you tell me the meaning of it ( I am learning the basics ). |
The payload of a WMQ message is what you're describing as data. There is a large amount of "data" in a WMQ message, especially with multiple headers in use and much of it does have specific formats (especially the RFH2!) and "payload" is a better term to describe the non-WMQ mandated part of the message. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
chandu85 |
Posted: Mon Dec 12, 2011 7:57 am Post subject: |
|
|
Newbie
Joined: 28 Nov 2011 Posts: 7
|
Hi Vitor,
I have understood the meaning of Payload now.
for the remaining points,
Quote: |
chandu85 wrote:
1. While I am reading the MQRFH2 header descriptions found a filed calld NameValueData , I do not understand what data should be kept in this filed.
Vitor wrote:
The data you wish/need to place in the RFH2. |
I will describe my question with an example in more detail.
I have data NAME BRITHDATE TELEPHONENUMBER PHONE ADDRESS to be transmitted. for this what data i need to placed in 'NameValueData' field of MQRFH2 header.
Quote: |
chandu85 wrote:
3. Is XML code papulated using program ( using COBOL STRING,UNSTRING verbs etc ) and finally move to 'NameValueData' field of MQRFH2 header.
Vitor wrote:
I doubt it. It's XML like but not a document, and your payload doesn't sound much like XML either. |
If my data is like
NAME BRITHDATE TELEPHONENUMBER PHONE ADDRESS
then I should form the xml code in COBOL using UNSTRING,STRING and INSPECT then final format string should be moved to a final variable of MQRFH2
could you please refer the below link http://www.mqseries.net/phpBB2/viewtopic.php?t=42672. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Dec 12, 2011 8:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 12, 2011 8:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
chandu85 wrote: |
I have data NAME BRITHDATE TELEPHONENUMBER PHONE ADDRESS to be transmitted. for this what data i need to placed in 'NameValueData' field of MQRFH2 header. |
None. You don't need an RFH2 header at all, it's optional. It seems to be this SystemB that's consuming the message that wants it so it's up to them what they want in it.
I would be fairly suprised if that's what your consumers are expecting. That 3 year old thread you referenced is talking about setting JMS properties. I would expect that your message is expected to have an RFH2 with properties set (if it's a JMS application the JMS specific properties are carried in part in the RFH2) with your payload (NAME and so forth) following that in an XML format.
So the question remains. Why does SystemB expect an RFH2 header and what do they want in it?
I mean, if you use the coding in that thread to pass the details as properties and they're expecting to be parsing the payload for them, it's not going to end that well is it? Likewise if you put the details in the RFH2 and/or the payload but don't set the other RFH2 properties they expect it's going to fail.
Obtain the requirements. Then design your code. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 12, 2011 8:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
It's also worth underlining that that 3 year old thread was started because the code posted failed to correctly create an RFH2. So if you use that to build an RFH2 you're going to be out of luck. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 12, 2011 11:16 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 12, 2011 11:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Where did WMB pop up from? I thought this was just z/OS CICS COBOL -> distributed JMS  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Dec 12, 2011 11:22 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Lack of OP clarity. JMS? MB? Message properties? Not sure exactly what the OP wants or needs.
COBOL and CICS seem like red-herrings in this discussion. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Dec 12, 2011 2:52 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Vitor wrote: |
chandu85 wrote: |
From MQ manuals I understood that data should be kept in a MQ's specified format then only data can be sent/receive from MQ's. The format is MQ DATA = HEADER + DATA
where HEADER = MQMD + MQRFH2
DATA = ABCDEFGHIJKLMN.( Correct me If I am wrong ). |
Ok, in that sense I conceed it's a specified format in that it must be preceeded by at least the MQMD. |
An MQ message consists of two parts.
1) The Message Descriptor structure (aka MQMD, version 1 or 2)
This consists of a well defined set of field values. They are documented in the WMQ App Programming Reference.
2) The Message Data (aka payload)
This can contain any format of data (eg. text, images, pdf, encrypted, there are no limitations). There are some formats which MQ is aware of and can take action on them, such including an RFH header, which is usually followed by application data. The RFH header can contain Message Properties. MQI function calls were added to MQ v7.0 to allow standard manipulation of these properties by apps, without them needing to build and manage the RFH headers themselves. Some app environments were aware of RFH and message properties prior to v7.0, such as JMS.
The MQMD fields are also considered to be Message Properties. _________________ Glenn |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Dec 12, 2011 8:30 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
OK, I'm surprised that nobody mentioned this to you before. But if working with V7 you can set the message properties and have the system transform them into an RFH2. See the property control parameter on the queue / channel.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|