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 » PARSING Question

Post new topic  Reply to topic
 PARSING Question « View previous topic :: View next topic » 
Author Message
pfaulkner
PostPosted: Thu Oct 17, 2002 7:35 am    Post subject: PARSING Question Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

I have Message Flow that parses an C message using MRM CWF but on occaison some messages are not the full length and therefore I get parsing errors because the msg does not meet to expected length I have defined in my message set. Is it possible to tell the parser to pad the message set with spaces or zeroes depending on the data type if the message is not long enough?

I also have an XML message Set which could have the same issue.
Back to top
View user's profile Send private message AIM Address
pfaulkner
PostPosted: Thu Oct 17, 2002 8:12 am    Post subject: Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

I set the Connection min occurs in the message set to ZERO but I also need to reference the fields that may or may not be there. When I do this I get a parsing error because the fields are not there.
Back to top
View user's profile Send private message AIM Address
mverh
PostPosted: Thu Oct 17, 2002 9:31 am    Post subject: Reply with quote

Voyager

Joined: 06 Mar 2002
Posts: 97

Could you possibly:

1. define two (or more) messages in the mrm
2. specify BLOB as the domain on input
3. Check the length of the BLOB to determine the message type
4. RCD to the appropriate message
Back to top
View user's profile Send private message
pfaulkner
PostPosted: Thu Oct 17, 2002 9:41 am    Post subject: Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

Can't do it exactly that way because my message consists of 2 parts. A variable length header followed by variable length msg data. So checking the BLOB length wouldn't tell me anything. But my msg header does contain a length field which I need to extract. Having that I can still use the single message set and use the length to know what fields I can and cannot access..

FYI. I have another Question open trying to figure out how to CAST part of my BLOB to an integer to access this length field...
Back to top
View user's profile Send private message AIM Address
lung
PostPosted: Thu Oct 17, 2002 5:44 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Paul,

MRM-CWF is supposed to be 'fixed-length'. You may want to ask the sending application to fix the length of each field in the message to a certain length.

To cast blob to an integer, first u need to calculate where the length field is located and the length of it. For example, if the length field is starts from the 60th byte in the message and its length is 4 bytes, then...
Code:
SET A = CAST(SUBSTRING(InputBody.BLOB FROM 60 FOR 4) AS INT)

Hope this helps!
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PARSING Question
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.