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 from Char to DECIMAL

Post new topic  Reply to topic
 Conversion from Char to DECIMAL « View previous topic :: View next topic » 
Author Message
kirankinnu
PostPosted: Wed Sep 26, 2007 1:01 pm    Post subject: Conversion from Char to DECIMAL Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

I am using WMB V6

I am trying to convert from Char to DECIMAL

I am using this statement CAST(tt AS DECIMAL(4,2)); to convert from char tt to decimal. When I look at the code in debug mode, At this point, the broker is hunging up and I am getting disconnected from debug mode. What might be the reason.

Thank You,
Kiran
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Wed Sep 26, 2007 1:20 pm    Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

When I looked at the logs I could see this message

The Java API framework could not create an instance of 'BigDecimal'.

What does this mean. Do I need to install any fixpacs.

Thank you,
Kiran
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Sep 26, 2007 2:26 pm    Post subject: Reply with quote

Grand High Poobah

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

Have you tried using the format clause in conjunction with your CAST?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kirankinnu
PostPosted: Thu Sep 27, 2007 5:56 am    Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

I think the FORMAT clause is doing the work. But I was wondering why the previous statement is not working.

1 more quick question,

For example I have the input format as 2345, what format should I give to get the output format as 23.45

Thanks Again
Kiran
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 27, 2007 6:17 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kirankinnu wrote:
I think the FORMAT clause is doing the work. But I was wondering why the previous statement is not working.

There is no format clause on the previous statement, there is only a precision.

1 more quick question,

kirankinnu wrote:
For example I have the input format as 2345, what format should I give to get the output format as 23.45


The format clause that specifies that the string input consists of two digits and a virtual decimal of two places.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Thu Sep 27, 2007 6:37 am    Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

The problem over here is I am gettting the data as Char from Msgset (I cannot change the msgset) and Now I have to convert the Char to DECIMAL using the esql code. Is there a way to mention the virtual decimal in the ESQL.

Thank You,
Kiran
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 27, 2007 6:39 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kirankinnu wrote:
Is there a way to mention the virtual decimal in the ESQL.


If I had to know the answer to this question, I would go look up the reference on the ESQL CAST statement in the Info Center.
_________________
I am *not* the model of the modern major general.
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 from Char to DECIMAL
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.