Author |
Message
|
Qadeer_824 |
Posted: Tue Sep 30, 2008 5:26 am Post subject: how to copy rfh2 header on mainframe |
|
|
 Acolyte
Joined: 04 Oct 2007 Posts: 59
|
Hi,
I am currently working on a requirement where an application places xml on a queue, which is converted to flat file on broker and sent to mainframe QM. MQ triggering is setup on the queue present on Mainframe QM which invokes a cobol program which in turn invokes an existing application. The response is received by cobol program and placed into a different queue which again reaches broker and finally sent to target app.
So, the scenario would be
Request
Request Msg (Source1) => Broker => Request Msg (Mainframe) => Cobol Program => MF Application
Response is returned by MF Application to the Cobol Program
Response
Cobol Program => Response Msg (Mainframe) => Broker => Response Msg (Target1)
There is one field coming from Source1 and should be copied in the response message, but the MF application does not return it in the response message. This is the only key field in the input message.
I can think of two ways to map it:
1. concatenate this field as part of the input message to cobol program which trims it out and sends the remaining data to MF application. Before sending response, it concatenates the trimmed field to response.
2. send this field as in usr folder of MQRFH2 header. This is copied back into the response message.
As the field in question has a variable length of up to 255 bytes, i would prefer to send it in the usr folder. But on mainframe, how can i copy the same header into the output message?
Regards,
Qadeer |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Sep 30, 2008 5:58 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
Quote: |
how can i copy the same header into the output message? |
could you please be more specific? is this a Cobol question how to create a MQRFH2 Header in Cobol? _________________ Regards, Butcher |
|
Back to top |
|
 |
Qadeer_824 |
Posted: Tue Sep 30, 2008 6:00 am Post subject: |
|
|
 Acolyte
Joined: 04 Oct 2007 Posts: 59
|
Yup! In the cobol program i do an MQGET followed by MQPUT. The header data of MQGET needs to be copied into the header of message being placed in MQPUT. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Sep 30, 2008 6:25 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
well, what you MQGET is placed into storage. there are copy books for the various headers. you have storage for the output header and data too, so all you have to do is to move from input to output?!?
if you want to put the message 100% identical you could also specify the same storage areas during mqput and use the set all context or copy all context options.... _________________ Regards, Butcher |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Sep 30, 2008 7:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Bordering on the absurd, If the field is just a pass through for the mainframe why don't you let the broker take care of it in the flow?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Qadeer_824 |
Posted: Tue Sep 30, 2008 9:24 am Post subject: |
|
|
 Acolyte
Joined: 04 Oct 2007 Posts: 59
|
The response message is being placed in a different queue and there's a different flow which is processing the response. The possible ways i can think of are to store it temporarily in a database using some key combination and place it back while sending the response to target app.
But the message coming from mainframe does not have any other key field. so if out of 3 messages, 2 have arrived on the response queue and 1 was rejected, i am lost !
The other way is to use correlation id's but this looks more cumbersome than placing the data into header and getting it back in the response. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Sep 30, 2008 9:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Typical case for aggregation.
This will match back your messages. You can send a dummy message with the RFH2 as one part of the aggregation and wait on the MF response for the other part...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|