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 IndexWebSphere Message Broker (ACE) SupportCustom MQRFH2 folders

Post new topicReply to topic
Custom MQRFH2 folders View previous topic :: View next topic
Author Message
Simoncelli
PostPosted: Tue Nov 01, 2011 1:55 am Post subject: Custom MQRFH2 folders Reply with quote

Newbie

Joined: 01 Nov 2011
Posts: 4

We are trying to use a custom RFH2 folder in broker 7 and getting some unexpected results. At the moment the code uses the <usr> folder to store context info. The folder is created like this

IF EXISTS(inRef.MQRFH2[]) THEN
IF NOT EXISTS(inRef.MQRFH2.nagusr.GCS_INTERNAL_DATA.RFH2HeaderOriginator[]) THEN
SET outRef.MQRFH2.nagusr.GCS_INTERNAL_DATA.RFH2HeaderOriginator = 'EXTERNAL_CLIENT';
END IF;
ELSE
CREATE NEXTSIBLING OF outRef.MQMD DOMAIN ('MQRFH2');
SET outRef.MQRFH2.(MQRFH2.Field)Version = 2;
SET outRef.MQRFH2.(MQRFH2.Field)Format = MQFMT_STRING;
SET outRef.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;

----------------------------------
-- Set up the RFH2HeaderOriginator
----------------------------------
CREATE LASTCHILD OF outRef.MQRFH2 NAME 'nagusr';
SET outRef.MQRFH2.nagusr.GCS_INTERNAL_DATA.RFH2HeaderOriginator = envRef.GlobalMessageHeader.ServiceID;
END IF;

Will this approach work, simply using a custome folder name (nagusr) instead of usr?
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Tue Nov 01, 2011 2:58 am Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

I think it could be safer to use <usr> service forder instead of your own nagusr.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/aq06940_.htm

--
Marko
Back to top
View user's profile Send private message Visit poster's website
Simoncelli
PostPosted: Tue Nov 01, 2011 3:04 am Post subject: <usr> in mq7 Reply with quote

Newbie

Joined: 01 Nov 2011
Posts: 4

Thanks Marko,
The reason behind wanting to use <nagusr> instead of <usr> was because <usr> originally did not allow groups (mq7) , only simple elements. In response to a PMR there has been a 'fix' so <usr> supports groups (as it did in mq6 even though the docs said it didn't).
So with the uncertainty about what was supported in <usr> the tech leads decided to use a custom folder but I don't think its as simple as it sounds.
Back to top
View user's profile Send private message
marko.pitkanen
PostPosted: Tue Nov 01, 2011 3:17 am Post subject: Reply with quote

Chevalier

Joined: 23 Jul 2008
Posts: 440
Location: Jamsa, Finland

Hi,

If you are not using "predefined" service folder usr you perhaps have to add some more logic to your code like in pseudo code
Code:

SET outRef.MQRFH2.NameValueCCSID = 1208;
SET outRef.MQRFH2.NameValueLength = 1;
SET outRef.MQRFH2.NameValueData = CAST(ASBITSTREAM(...XMLNSC CCSID 1208) AS CHAR 1208)
SET outRef.MQRFH2.NameValueLength = LEGTH(outRef.MQRFH2.NameValueData);


I haven't tested that ever but it can perhaps be gathered from then documentation
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/aq06930_.htm

--
Marko
Back to top
View user's profile Send private message Visit poster's website
MrSmith
PostPosted: Tue Nov 01, 2011 3:51 am Post subject: Reply with quote

Master

Joined: 20 Mar 2008
Posts: 215

Personally I would be inclined to have left the standard <usr> folder as it is afterall a potential and expected structure and place your <nagusr> inside that, the point of the <usr> being that it is a a "user" definabler section. IMHO.

....and btw yu got a typo

Quote:
SET outRef.MQRFH2.NameValueLength = LEGTH(outRef.MQRFH2.NameValueData);


think should be LENGTH
_________________
-------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.”
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportCustom MQRFH2 folders
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.