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 hex to number using ASCII table

Post new topic  Reply to topic Goto page Previous  1, 2
 parsing hex to number using ASCII table « View previous topic :: View next topic » 
Author Message
Vitor
PostPosted: Wed Jun 17, 2009 9:40 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
So it's an integer.


I said that
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
JULLRICH
PostPosted: Wed Jun 17, 2009 10:21 am    Post subject: Reply with quote

Apprentice

Joined: 11 Aug 2005
Posts: 42
Location: München

Hi,
...that means I have to parse the first 2 bytes as integer to get the length-element and the other bytes as string using the length-element as LengthReference.

Isn't it?
I was doing this before also:

It is not working!

Result:
Message data : ''0001JB001234''
Text element offset : 2
Expected length of element : 3072
=> Exception

InputMsg:
X'000C303030314A42303031323334'

There must be another way of interpreting this 000C according to the ASCII Table ...


SRY, but it is my second MsgSet, I build!

another way:

When setting up an CWF with a single Element of physType LengthEncodedString 2 then WMB expects data length of 3072 in case of 000C and 2048 in case of 0008
=> it is also not working
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jun 17, 2009 10:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You did not configure your integer physical properties to match the correct byte order. You're receiving the integer in network byte order, since it's coming over TCP/IP.
Back to top
View user's profile Send private message
JULLRICH
PostPosted: Thu Jun 18, 2009 1:40 am    Post subject: Reply with quote

Apprentice

Joined: 11 Aug 2005
Posts: 42
Location: München

You must be right, because when working with one byte describing the length, it is working well.

So I have to change the byte order in that integers are being interpreted.
=> BigEndian LittleEndian ....

... and it worked fine also with 2 bytes of encoded length!


THX to you!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » parsing hex to number using ASCII table
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.