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 » How to use numerical calculation

Post new topic  Reply to topic
 How to use numerical calculation « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Tue Oct 30, 2007 8:41 am    Post subject: How to use numerical calculation Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Hi All,

I have a requirement wherein i have to place a decimal after reading the value at a specific place in the read number. So,if the read number is 2435 and the decimal value needs to be placed after 3 digits from the left which will be 2.435. Can anyone please help me in getting this. i have checked esql numeric functions and none tell about placing the decimals.

Regards
brgmo.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 30, 2007 8:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This is a "virtual" decimal.

There should be comments in the section on FORMAT where it talks about formatting numeric values.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brgmo
PostPosted: Tue Oct 30, 2007 9:20 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

can anyone please help me on this.this is really urgent.

\regards
brgmo
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Oct 30, 2007 10:06 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Huh. I was wrong - CAST ... FORMAT doesn't support virtual decimal points.

I guess you'll just have to use / to solve this problem.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Tue Oct 30, 2007 11:06 am    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

You can code this by writing your function and putting the decimal yourself.
Either cast to char(then substring/right/left etc) or do what Jeff says
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message 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 » How to use numerical calculation
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.