×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I misread what CEILING did
I thought you could use decimal places
Now that I have re-read it (a couple of times) - I stand corrected
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
‘If you're going through hell, keep going.’
Winston Churchill
-----Original Message-----
From: John Yeung [mailto:gallium.arsenide@xxxxxxxxx]
Sent: Wednesday, February 12, 2020 1:58 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: Alan Shore <ashore@xxxxxxxx>
Subject: Re: [EXTERNAL] Re: What is a good way to round up numbers in free form?
On Wed, Feb 12, 2020 at 1:39 PM Alan Shore via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:
Justin replied earlier - and suggested using the SQL command CEILING
Well, if you are rounding specifically to zero decimal places, toward positive infinity, then sure. Correspondingly, you can get *some* of the rounding functionality with FLOOR and TRUNCATE.
But rounding to arbitrary decimal places, or niche modes like half-down or away-from-zero, require you to compose your own (not too hard, given the available building blocks), or set the rounding mode and use QUANTIZE.
John Y.
As an Amazon Associate we earn from qualifying purchases.