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 » WebSphere Message Broker (ACE) Support » Problem with MQRFH2 parser

Post new topic  Reply to topic
 Problem with MQRFH2 parser « View previous topic :: View next topic » 
Author Message
nize
PostPosted: Wed Mar 17, 2010 5:13 am    Post subject: Problem with MQRFH2 parser Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Hi,

I have a problem using the MQRFH2 parser of WMB 6.1.0.5. The background is that I am parsing a message having an MQMD, XQH, zero or one MQMDE, zero or more MQRFH2 headers and then a payload.

The following code successfully creates a branch OutputRoot.XMLNSC.logMsg.MQRFH2:

Code:
create lastchild of OutputRoot.XMLNSC.logMsg DOMAIN 'MQRFH2' PARSE(
   blobPtr
   ENCODING encodPtr
   CCSID ccsidPtr);


However, I get no data when I try to access

Code:
DECLARE MQRFH2Length INTEGER OutputRoot.XMLNSC.logMsg.MQRFH2.Struclength;


But MQRFH2Length is assigned the value 2 when I use the line:

Code:
DECLARE MQRFH2Length INTEGER OutputRoot.XMLNSC.logMsg.MQRFH2.Version;


When debugging I believe all fields according to the MQRFH2 specification (including the variable section) appear in the eclipse "variable" section except for Struclength and Strucid.

Could it be a bug in the MQRFH2 parser?

Extra background:
I have checked that the blob being parsed really contains these two values. This I did by creating a message set based on the C header file for the MQRFH2 header and parsing in the MRM domain. Using this parser I access the correct values of the StrucId and the Struclength fields. However, it is not as straigh-forward creating a MRM parser for the variable part of the MQRFH2 and this is why I am trying with the parser which is build-in in WMB. If I dont find any other solution I guess I will parse the MQRFH2 header two times, the first time accessing the Struclength using the MRM domain and the next time accessing the variable part using the MQRFH2 domain.

I see in http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ad09730_.htm that StruchLength nor StrucId are listed as required for the parsers MQRFH2 and MQRFH2C, but I dont know what that means.

Thanks in advance!
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Mar 17, 2010 6:37 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you want OutputRoot to look like this:
Code:
OutputRoot
    MQMD
    XQH
    MQMDE
    (MQRFH2)*
    XMLNSC


Your code seems to be attempting to create this:
Code:
OutputRoot
    MQMD
    XQH
    MQMDE
    XMLNSC
        MQRFH2


Parsers cannot be nested in this way. If the message needs to be written by a sequence of different parsers then you need to set up a chain of header parsers followed by a chain of body parsers with all of them being direct children of OutputRoot.
Back to top
View user's profile Send private message
nize
PostPosted: Wed Mar 17, 2010 6:49 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Hi,

The problem does not occur when I try to serialize (i.e. generating a message to the output queue) but when I am parsing the binary stream to logical fields. So where I put them in the current nodes OutputRoot tree really is not the problem. I will have compute nodes after preparing for the serialization. I guess you could see it as misleading that I call one of the branches in the temporary structure XMLNSC.

So, instead, my problem is that when I am parsing I dont get ALL the fields contained in the MQRFH2 header.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Mar 17, 2010 7:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I guess you could see it as misleading that I call one of the branches in the temporary structure XMLNSC.
If you create a direct child of OutputRoot and give it the name 'XMLNSC' it automagically gets assigned to the XMLNSC parser. Same goes for any other built-in parser name ( 'MRM', 'MQRFH2' ). This does not happen in the other trees ( Environment, LocalEnvironment, ExceptionList ).
It *is* misleading, but more to the point, I cannot see any advantage to putting it under OutputRoot.XMLNSC. Why not put it into LocalEnvironment ( and use CREATE...DOMAIN 'MQRFH2', of course)?

I don't know why the MQRFH2 parser is not putting those two fields into OutputRoot, but I'm reluctant to think very hard about it until I see it failing under more normal circumstances
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 » WebSphere Message Broker (ACE) Support » Problem with MQRFH2 parser
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.