Author |
Message
|
ganeshkp |
Posted: Thu Apr 03, 2008 7:24 am Post subject: MQ RFH2 Header setup |
|
|
Newbie
Joined: 03 Dec 2003 Posts: 4
|
Hello,
I'm trying to setup the RFH2 data so the JMS client can read it.
Currently when the message goes thru he (the guy that recieves the data) does not see RFH2 at all.
Here is how I have setup the RFH2 header info. Apparently its not correct.
Can someone please guide me with a sample code? --Thanks and I appreciate your help.
MOVE 'RFH ' TO MQRFH-STRUCID.
MOVE 2 TO MQRFH-VERSION.
MOVE MQRFH-STRUC-LENGTH-FIXED-2
TO MQRFH-STRUCLENGTH
ADD 284 TO MQRFH-STRUCLENGTH
MOVE MQENC-NATIVE TO MQRFH-ENCODING
MOVE MQCCSI-DEFAULT TO MQRFH-CODEDCHARSETID
MOVE MQFMT-RF-HEADER-2 to MQRFH-FORMAT
MOVE MQRFH-NONE TO MQRFH-FLAGS
MOVE 1208 TO MQRFH-NAMEVALUECCSID.
MOVE '<usr>' TO RFH-USR-START
MOVE '<SCCF>123456789012345</SCCF>' TO RFH-SCCF
MOVE '<HomeHostCd>1</HomeHostCd>' TO RFH-HOMEHOSTCD
MOVE '<ToStationCd>AAAA</ToStationCd>' TO RFH-TOSTATIONCD
MOVE '<ToPlanCd>999</ToPlanCd>' TO RFH-TOPLANCD
MOVE '<FromStationCd>XXX</FromStationCd>'
TO RFH-FROMSTATIONCD
MOVE '<FromPlanCd>888</FromPlanCd>' TO RFH-FROMPLANCD
move '</usr>' TO RFH-USR-END
.
STRING
RFH-USR-START
RFH-SCCF
RFH-HOMEHOSTCD
RFH-TOSTATIONCD
RFH-TOPLANCD
RFH-FROMSTATIONCD
RFH-FROMPLANCD
RFH-USR-END
DELIMITED BY SIZE
INTO
RFH-USR-DATA
END-STRING.
MOVE RFH-USR-DATA TO RFH2-USR-DATA. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Apr 03, 2008 7:28 am Post subject: Re: MQ RFH2 Header setup |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ganeshkp wrote: |
I'm trying to setup the RFH2 data so the JMS client can read it.
|
I'm guessing this is mainframe COBOL? I'm not aware of an RFH2 sample in Cobol, and I assume you've looked in all the usual places.
Have you set the MQMD to indicate the presence of an RFH2? I notice you've set the RFH2 to indicate the presence of another RFH2, which I doubt you intended. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ganeshkp |
Posted: Mon Apr 07, 2008 8:15 am Post subject: |
|
|
Newbie
Joined: 03 Dec 2003 Posts: 4
|
Vitor,
Thanks for the reply. Sorry I was out for a couple of days.
Yes, I'm on Z/OS COBOL.
Yes, I have set the MQMD-FORMAT as below.
MOVE MQFMT-RF-HEADER-2 to MQMD-FORMAT.
I could not find a lot of samples either. I was just hoping someone who had not thought about posting might have one.
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Apr 07, 2008 8:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I think I remember an OLD post (at least 4 years old) that had COBOL code for building an RHF2. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EddieA |
Posted: Mon Apr 07, 2008 9:04 am Post subject: Re: MQ RFH2 Header setup |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
ganeshkp wrote: |
MOVE MQFMT-RF-HEADER-2 to MQRFH-FORMAT |
No. That goes in the MQMD header. In the RFH2, you describe the payload that follows the RFH2.
**Update** Ooops, I didn't spot that Vitor had already addressed this.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
vinish |
Posted: Thu Nov 15, 2012 4:14 am Post subject: |
|
|
Newbie
Joined: 15 Nov 2012 Posts: 3
|
Hi Ganesh,
Even i am facing the similar issue as i am getting 2142 completion code. Please let me know what change did you make to run the code in order to successfully put the XML message in the MQ Queue. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 15, 2012 5:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vinish wrote: |
Even i am facing the similar issue as i am getting 2142 completion code. Please let me know what change did you make to run the code in order to successfully put the XML message in the MQ Queue. |
It may be a similar issue to this 4 year old post but not the same one. The OP also hasn't posted since this so you may be waiting a while for an answer.
Can I recommend the radical step of starting a new thread with your problem, which talks about your software set up (including versions), how you perceive the problem and what you have done to try and resolve it already.
Otherwise we're likely to just suggest the same things as we suggest here.
You might want to include a link to this thread if you feel it will help.
Better information, better advice. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 15, 2012 1:43 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I'd expect that by now the version on the MF would be v7x.
So please drop the notion of RFHHeader and use message properties.
I'm sure the infocenter describes somewhere how to handle message properties in COBOL.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|