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 » Length reference

Post new topic  Reply to topic
 Length reference « View previous topic :: View next topic » 
Author Message
KIT_INC
PostPosted: Fri Jul 22, 2011 10:46 am    Post subject: Length reference Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

I am learning how to model a message. My environment is WMB V61
I have a message which is just 1 byte length followed by data.
I created a CWF Message with two local elements
MSG_Length - type integer , length 1 byte
MSG_Data - type string length reference MSG_Length, Length unit character

When I parsed an Input message (2ab) using MQInput node. I hope the mrm parser will read the first byte '2' as length and expect 2 characts of data to follow (which is ab). However I got a parser error saying that the expected length is 50. I think the parser is reading the 2 as hex 32 (dec 50) and hence expect 50 characters to follow.
If this is the way the parser works, how can I do this for messages with only 2 of 3 bytes of data ?
Back to top
View user's profile Send private message
joebuckeye
PostPosted: Fri Jul 22, 2011 11:27 am    Post subject: Reply with quote

Partisan

Joined: 24 Aug 2007
Posts: 365
Location: Columbus, OH

The character '2' is not the same thing as an integer representing the number 2.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 22, 2011 12:54 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

joebuckeye wrote:
The character '2' is not the same thing as an integer representing the number 2.




KIT_INC wrote:
If this is the way the parser works, how can I do this for messages with only 2 of 3 bytes of data ?


By putting an integer representation of the value 2 (or 3) as appropriate in the first byte.

Can be a bit fiddly with RFHUtil et al, but a few line of code in the language of your choice will do it fine.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Sat Jul 23, 2011 12:50 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Your message model is wrong.

You have told the parser to expect a binary integer in the first field, but your input data actually contains a text integer. You could model it as an 'external decimal' in CWF. Alternatively, use TDS to model your data - TDS assumes that your data is represented as text.
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 » Length reference
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.