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 » ESQL doubt

Post new topic  Reply to topic
 ESQL doubt « View previous topic :: View next topic » 
Author Message
shubha_s
PostPosted: Mon Oct 26, 2009 10:12 pm    Post subject: ESQL doubt Reply with quote

Acolyte

Joined: 10 Mar 2009
Posts: 57

HI,

I have a variable declared as string in the message set . In the ESQL code I want this string to be converted to decimal with precision 2.
For Ex :
a = 12345;
The final result what i want is 123.45;

How do I do it? Can any1 help me?? As am new to this I am not understanding how to do.
Whichever manner I convert it is throwign me error g"Incompatible types"

--
Thanks
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon Oct 26, 2009 10:21 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

do a casting.


go through this link too

http://mqseries.net/phpBB/viewtopic.php?t=19160&start=0&postdays=0&postorder=asc&highlight=&sid=b47c8b2fee85711038019cfd7f12e950
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Vgowda
PostPosted: Mon Oct 26, 2009 10:31 pm    Post subject: Reply with quote

Acolyte

Joined: 11 Dec 2007
Posts: 61
Location: Bengaluru

Hi Shubha,
The below code works for you

DECLARE Jobcode CHARACTER '12345';
DECLARE Dvalue DECIMAL ;
DECLARE JB1 DECIMAL ;
SET JB1 = CAST( Jobcode AS DECIMAL);
SET Dvalue = (JB1/100) ;

I think, this solves your confusion
_________________
Regards
Vinay
Back to top
View user's profile Send private message
shubha_s
PostPosted: Tue Oct 27, 2009 12:40 am    Post subject: ESQL doubt Reply with quote

Acolyte

Joined: 10 Mar 2009
Posts: 57

Hi,
Thanks a lot Vinay..Its Working
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 » ESQL doubt
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.