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 » Conversion of Packed Decimal to Decimal in ESQL code.

Post new topic  Reply to topic
 Conversion of Packed Decimal to Decimal in ESQL code. « View previous topic :: View next topic » 
Author Message
sreemoyee.b
PostPosted: Mon Jul 20, 2009 8:43 am    Post subject: Conversion of Packed Decimal to Decimal in ESQL code. Reply with quote

Newbie

Joined: 20 Jul 2009
Posts: 6

Hi All,

I am calling a Stored Procedure from my message broker flow, where in return i would be getting one packed decimal value in a character field.. In my message flow (through ESQL) I have to convert the packed decimal value to a decimal value..

Can anybody please help ASAP..

Sreemoyee.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 20, 2009 9:15 am    Post subject: Re: Conversion of Packed Decimal to Decimal in ESQL code. Reply with quote

Grand High Poobah

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

sreemoyee.b wrote:
In my message flow (through ESQL) I have to convert the packed decimal value to a decimal value..


CAST? FORMAT?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sreemoyee.b
PostPosted: Tue Jul 21, 2009 1:26 am    Post subject: Reply with quote

Newbie

Joined: 20 Jul 2009
Posts: 6

But what is the datatype that I have to define for packed decimal in FORMAT or CAST..?

And, the field I am going to get from the Stored Procedure is an array of 5 specific rates in packed decimal of bytes-3. I guess I have to unpack them as well..

Please help..

Sreemoyee.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 21, 2009 1:41 am    Post subject: Reply with quote

Grand High Poobah

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

sreemoyee.b wrote:
But what is the datatype that I have to define for packed decimal in FORMAT or CAST..?


Whatever you need it to be....

sreemoyee.b wrote:
And, the field I am going to get from the Stored Procedure is an array of 5 specific rates in packed decimal of bytes-3. I guess I have to unpack them as well..


I guess you're right.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sreemoyee.b
PostPosted: Tue Jul 21, 2009 1:51 am    Post subject: Reply with quote

Newbie

Joined: 20 Jul 2009
Posts: 6

That is what I want to know.. how can I unpack the packed decimal in our ESQL code?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 21, 2009 2:37 am    Post subject: Reply with quote

Grand High Poobah

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

sreemoyee.b wrote:
That is what I want to know.. how can I unpack the packed decimal in our ESQL code?


I still think CAST and FORMAT are the best options.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Tue Jul 21, 2009 8:18 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Packed decimal should be handled as a binary and not as char data. I believe that if a packed decimal representation gets converted to a char format, then it loses its meaning but I might be wrong too.
Back to top
View user's profile Send private message Yahoo Messenger
kimbert
PostPosted: Tue Jul 21, 2009 1:41 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Don't convert it to CHARACTER - packed decimal is a binary format.
You should
- carefully read the specification of the packed decimal format
- write some ESQL or Java code to convert the packed decimal BLOB to a signed integer
or you could exploit the fact that the MRM parser supports packed decimals, and define a very small message set containing a single packed decimal field...but you would only do that if you were very scared of implementing your own solution
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 » Conversion of Packed Decimal to Decimal in ESQL code.
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.