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 » ROUND in ESQL not working as expected

Post new topic  Reply to topic
 ROUND in ESQL not working as expected « View previous topic :: View next topic » 
Author Message
Adi3
PostPosted: Fri Aug 17, 2007 12:37 pm    Post subject: ROUND in ESQL not working as expected Reply with quote

Novice

Joined: 19 Dec 2006
Posts: 15

ROUND(1.9150)
Returns 1.92
which is correct

But

ROUND(1.9450)
Returns 1.94 (weird behaviour of esql function)
which is incorrect, the result should be as 1.95

I need this Round logic to be working as expected. Is there any function in esql gives the perfect Rounding.

Please help me.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 17, 2007 2:36 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Have you considered reading the documentation on the ESQL Round function, to find out if it has any options you can specify to change how it works, or to find out what you should expect it to do?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Adi3
PostPosted: Fri Aug 17, 2007 6:45 pm    Post subject: ROUND not working as expected Reply with quote

Novice

Joined: 19 Dec 2006
Posts: 15

I referred the ESQL Document and found nothing relevant that is the reason I posted here to get masters help
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Aug 17, 2007 7:26 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This really didn't help?

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak05380_.htm

?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Adi3
PostPosted: Sat Aug 18, 2007 10:08 am    Post subject: Reply with quote

Novice

Joined: 19 Dec 2006
Posts: 15

Jeff, Thanks a lot!

I referred the ESQL manual but not the Information center. Here after, I will refer the Information center too. Its working as expected with the mode ROUND_HALF_UP.
Back to top
View user's profile Send private message
Adi3
PostPosted: Mon Aug 20, 2007 6:33 am    Post subject: Reply with quote

Novice

Joined: 19 Dec 2006
Posts: 15

By seeing the example and table in the Information Center. I replied that ROUND_HALF_UP is working.

The list of modes given for Round are:
ROUND_UP
ROUND_DOWN
ROUND_CEILING
ROUND_FLOOR
ROUND_HALF_UP
ROUND_HALF_EVEN
ROUND_HALF_DOWN

But when I tried with ESQL coding that particular mode alone is throwing the error. All other modes are working. But for my requirement I need ROUND_HALF_UP mode to work.

Please help me.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 20, 2007 7:48 am    Post subject: Reply with quote

Grand High Poobah

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

What is the error being thrown?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Adi3
PostPosted: Mon Aug 20, 2007 8:20 am    Post subject: Reply with quote

Novice

Joined: 19 Dec 2006
Posts: 15

Even If I select the mode from the drop down list, it says as follows:

Severity Description Resource In Folder Location Creation Time
2 Syntax error. Valid options include: ROUND_CELLING ROUND_DOWN ROUND_FLOOR ROUND_HALF_DOWN ROUND_HALF_EVEN ROUND_HALF_UP ROUND_UP ss.esql sample line 8 August 20, 2007 12:18:35 PM

This is the ESQL code:
SET X = ROUND(2.5,0 MODE ROUND_HALF_UP);

All the modes working except this mode.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Aug 20, 2007 9:20 am    Post subject: Reply with quote

Grand High Poobah

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

Did you open a PMR yet?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Adi3
PostPosted: Tue Aug 21, 2007 10:52 am    Post subject: Reply with quote

Novice

Joined: 19 Dec 2006
Posts: 15

It works fine with the MB runtime fixpack3 and MB tool kit interim fix008.

Thank you.
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 » ROUND in ESQL not working as expected
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.