Author |
Message
|
Yash |
Posted: Mon Sep 30, 2002 9:06 am Post subject: How to assign MQRFH2 values with usr and mcd ? |
|
|
Novice
Joined: 26 Sep 2002 Posts: 24
|
Hi,
I am trying to assign MQRFH2 values to my message.I writing the following code.In the code I want to assign application group value as 'MQAribaImport' and Msg Type/ fmt Name value.
SET OutputRoot.MQMD.Format ='MQHRF';
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQMD.Format = MQFMT_RF_HEADER_2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2;
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format= MQFMT_STRING ;
SET OutputRoot.MQRFH2.(MQRFH2.Field)"Encoding" = 273;
SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208;
SET OutputRoot.MQRFH2.mcd.Msd = 'XML';
SET OutputRoot.MQRFH2.usr.AppiGroup = 'MQAribaImport';
SET OutputRoot.MQRFH2.usr.FmtName = 'Honda_Peoplesoft!HCM!HondaComCntlReply!HCM_HondaComCntlReply';
I am getting an error saying
"Invalid length in RFH2 variable area - data skipped
Message read from 16824TEST length=1877 (data 1677 rfh 200)"
Can anyone please help me with this problem.
Thanks, _________________ Yash |
|
Back to top |
|
 |
mq_developer |
Posted: Mon Sep 30, 2002 5:24 pm Post subject: |
|
|
Voyager
Joined: 18 Feb 2002 Posts: 82
|
You are missing the NameValueDataLength
For every header in MQ , you have to explicitly specifies the length of the header. Similarly for RFH2 header in NameValueData , you will be specifying the length of entire Namevaluedata field [Variable portion]
Hope this helps... |
|
Back to top |
|
 |
Yash |
Posted: Tue Oct 01, 2002 3:17 am Post subject: |
|
|
Novice
Joined: 26 Sep 2002 Posts: 24
|
Thanks. Can you please explain me about the NameValueDataLength with an example. Its urgent.
Thanks, _________________ Yash |
|
Back to top |
|
 |
mq_developer |
Posted: Tue Oct 01, 2002 4:34 pm Post subject: |
|
|
Voyager
Joined: 18 Feb 2002 Posts: 82
|
jus realized that MQSI will take care of NAMEVALUEDATA length field , i think in your case its populated as 200 which is just fine (Should be multiples of 4) .
But in your code i noticed that MQMD.Format has been to set MQHRF , it should be
SET OutputRoot.MQMD.Format = 'MQHRF2' ;
Another thing is you dont need to explicitly specify the encoding , MQSI will populate with NATIVE encoding of qmgr where broker is connected to ... ,even if you specify the wrong encoding this problem will happen ..
Hope this helps .... |
|
Back to top |
|
 |
lbrett |
Posted: Wed Oct 02, 2002 5:00 am Post subject: |
|
|
Novice
Joined: 24 Jan 2002 Posts: 20
|
The format of the MQMD should be MQFMT_RF_HEADER_2 or 'MQHRF2 ' ('MQHRF2bb' where b represents a space).
Can you post a trace of the message after you build the MQRFH2 in the compute node (i.e. use ${Root}. |
|
Back to top |
|
 |
lbrett |
Posted: Wed Oct 02, 2002 5:20 am Post subject: |
|
|
Novice
Joined: 24 Jan 2002 Posts: 20
|
Also, is MQSI giving you this error? And do you build the RFH2 immediately after the "-- Enter SQL below this line." or is after you use OutputRoot.<Parser>... If it is the latter, what may be happening is that the payload (i.e. the data) is before the header in the message. If possible, browse the queue and post the message that MQSI put's to the queue. |
|
Back to top |
|
 |
|