ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » How to set MQRFH2 header in MQ using COBOL

Post new topic  Reply to topic
 How to set MQRFH2 header in MQ using COBOL « View previous topic :: View next topic » 
Author Message
speeleti_MF
PostPosted: Wed Sep 10, 2014 6:53 pm    Post subject: How to set MQRFH2 header in MQ using COBOL Reply with quote

Newbie

Joined: 10 Sep 2014
Posts: 7

I have requirement to add user header in MQ message to include some user defined properties (meta data) for receiving application to know which message it is. For that i found that need to set MQRFH2 header to achieve this. Can any one please let me know how to set MQRFH2 header.

I have found MQRFH2 copybook layout.

Code:
** MQRFH2 structure                                             
 10  MQRFH.                                                     
** Structure identifier                                         
 15  MQRFH-STRUCID PIC X(4) VALUE 'RFH '.                       
** Structure version number                                     
 15  MQRFH-VERSION PIC S9(9) BINARY VALUE 2.                     
** Total length of MQRFH2 including all NameValueLength and     
** NameValueData fields                                         
 15  MQRFH-STRUCLENGTH PIC S9(9) BINARY VALUE 36.               
** Numeric encoding of data that follows last NameValueData field
 15  MQRFH-ENCODING PIC S9(9) BINARY VALUE 785.                 
** Character set identifier of data that follows last           
** NameValueData field                                           
 15  MQRFH-CODEDCHARSETID PIC S9(9) BINARY VALUE -2.             
** Format name of data that follows last NameValueData field     
 15  MQRFH-FORMAT PIC X(8) VALUE SPACES.                         
** Flags                                                         
 15  MQRFH-FLAGS PIC S9(9) BINARY VALUE 0.                       
** Character set identifier of NameValueData                     
 15  MQRFH-NAMEVALUECCSID PIC S9(9) BINARY VALUE 1208.           


It would be greatful if you provide sample COBOL code...Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Sep 11, 2014 4:11 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Well you are running into some challenges here.
It does not look that the structure includes the name/value content,
the length of the structure is byte aligned on 4 bytes...
I would encourage you to look up the COBOL manual and try and use properties in handle...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Sep 11, 2014 4:57 am    Post subject: Re: How to set MQRFH2 header in MQ using COBOL Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

speeleti_MF wrote:
I have requirement to add user header in MQ message to include some user defined properties (meta data) for receiving application to know which message it is. For that i found that need to set MQRFH2 header to achieve this.


Only if you're using an out of support version of WMQ, in which case you're in a Hell of your own making.

Set the properties directly. If (by some chance) the receiving program physically requires an RFH2 header because it's old, get the queue manager to sort it out for you.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How to set MQRFH2 header in MQ using COBOL
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.