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 » Converting Hex values to Integer

Post new topic  Reply to topic
 Converting Hex values to Integer « View previous topic :: View next topic » 
Author Message
lung
PostPosted: Wed Sep 27, 2006 8:23 pm    Post subject: Converting Hex values to Integer Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

As per title, how can I convert a hex value into integer?

For example 0A in hex actually means 10 in base-10 decimal... But how do I do that in ESQL? I tried casting '0A' as integer but it doesn't work.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
fjb_saper
PostPosted: Thu Sep 28, 2006 2:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

did you set up '0A' as blob? when casting to integer did you specify encoding? And finally did you set the right length for the integer in the blob by adding hex 00?

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
lung
PostPosted: Thu Sep 28, 2006 6:14 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Thanks for the reply.

No, the "0A" is not in BLOB. It is in CHAR format, and that is why I do not think it is necessary to specify encoding when converting to INT (please correct me if I am wrong).

I am not trying to convert a BLOB into CHAR, I am trying to convert a Hexadecimal value (base-16 decimal) to a normal Decimal value (base-10 decimal). 0A in Hexadecimal actually has a value of 10 in decimal. That is what I am trying to achieve...

I could write a custom function to get the results I want, but I'm sure a sophisticated software such as Websphere Message Broker already has a syntax to do this? I mean even Microsoft Calculator can do it...
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 » Converting Hex values to Integer
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.