Author |
Message
|
Simoncelli |
Posted: Tue Nov 01, 2011 1:55 am Post subject: Custom MQRFH2 folders |
|
|
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 |
|
 |
marko.pitkanen |
Posted: Tue Nov 01, 2011 2:58 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
|
Back to top |
|
 |
Simoncelli |
Posted: Tue Nov 01, 2011 3:04 am Post subject: <usr> in mq7 |
|
|
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 |
|
 |
marko.pitkanen |
Posted: Tue Nov 01, 2011 3:17 am Post subject: |
|
|
 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 |
|
 |
MrSmith |
Posted: Tue Nov 01, 2011 3:51 am Post subject: |
|
|
 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 |
|
 |
|