Author |
Message
|
kishoreavk32 |
Posted: Wed Jan 07, 2009 5:26 am Post subject: JMS Outnode |
|
|
Novice
Joined: 11 Sep 2008 Posts: 22
|
Hi every One,
Now i am trying put one variable into JMS Header and send to JMSoutput Node.
I configed JMSQueue in MQ by using JMSAdmin.bat .
I Can put the message in queue but header is unable to see.
can anybody hepl me. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 07, 2009 5:35 am Post subject: Re: JMS Outnode |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kishoreavk32 wrote: |
I Can put the message in queue but header is unable to see. |
What type of variable? How are you adding the value (ESQL or Java)? What are you using to examine the message? Does the rest of the message & header appear correct? Does it match the trace you've taken of the message that broker is providing? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kishoreavk32 |
Posted: Wed Jan 07, 2009 6:09 am Post subject: Re: JMS Outnode |
|
|
Novice
Joined: 11 Sep 2008 Posts: 22
|
Hi
I adding character variable in ESQl, I am passing MQMD Header and MQRFH2 Header and JMS Transport header |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 07, 2009 6:17 am Post subject: Re: JMS Outnode |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kishoreavk32 wrote: |
I adding character variable in ESQl |
Very nice. What are the answers to my other questions?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kishoreavk32 |
Posted: Wed Jan 07, 2009 7:05 am Post subject: Re: JMS Outnode |
|
|
Novice
Joined: 11 Sep 2008 Posts: 22
|
THis my code:
SET OutputRoot.MQMD.CodedCharSetId=1208;
SET OutputRoot.MQMD.Format='BLOB';
SET OutputRoot.MQMD.Encoding = 'UTF-8';
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.MQMD.Version = 2;
SET OutputRoot.MQMD.CorrelId = X'4d454e53414a453320202020202020202020202020202020';
-- SET OutputRoot.MQMD.Encoding = 785;
SET OutputRoot.MQMD.Persistence = 1;
SET OutputRoot.MQMD.Priority = 8;
SET OutputRoot.MQRFH2.Format='MQSTR';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version=2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Encoding=MQENC_NATIVE;
SET OutputRoot.MQRFH2.(MQRFH2.Field)CodedCharSetId=1208;
-- SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID='1208';
SET OutputRoot.MQRFH2.NameValueLength=4;
-- SET OutputRoot.MQRFH2.NameValueData='Data';
-- SET OutputRoot.MQRFH2.usr.MessageName='Message from MB';
-- SET OutputRoot.MQRFH2.usr.MsgVersion='V1';
--
SET OutputRoot.JMSTransport.Transport_Folders.Provider_Properties.JMS_IBM_MsgType= CAST(SUBSTRING(plainText FROM uniqueID FOR 6) AS CHARACTER); |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jan 07, 2009 7:10 am Post subject: Re: JMS Outnode |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kishoreavk32 wrote: |
THis my code: |
And very nice code it is, apart from a few lines I'd have avoided, the user variables you're trying to set being commented out (!) and the setting of the correl id (never a good idea, a hard coded correl id) but still doesn't answer my outstanding questions:
- what are you using to examine the message?
- does the rest of the message & header appear correct?
- does it match the trace you've taken of the message that broker is providing?
The last is a diagnostic hint.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Jan 07, 2009 12:37 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
As an aside and may not be your problem.
You are setting the MQRFH2.Format to MQSTR which is fine & dandy but the MQMD.Format should be set to MQRFH2 so that the extra header is recognised by WMQ properly. If you don't do this, when you read the message, the start of the data will be the start of the RFH2 header.
This is a WMQ and not a WBI requirement.
As detailed here for example
[url]http://www.mqseries.net/phpBB2/viewtopic.php?p=188386&sid=48b56073bbb61c36c1a01e1f734c3f16[/url]
To be syntactically correct, you should also use the Create Field .... to create the correct MQRFH2 Structure in the OutputRoot.
There are many examples of this in this forum. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|