×
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.
Hello Tom,
It seems to work if there are some figures after the decimal. If the
number is 125.00 then the result of
125.00 / 100000000 is "0.00000125". This time it is the trailing zeroes
that are missing !!
Thanks & best regards
Ewart
qsrvbas@xxxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
01/16/2008 08:37 AM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: Output 125.56 as 00012556 in REXX
ewart.desouza wrote:
I know this is an RPG forum but I'm just taking a chance in case some of
you are experienced in REXX. I need the output of a numeric variable to
be
with the leading zeroes & without the decimal. Anyone have any ideas.
If I use Amt = Right(125.56,8,'0') it displays 00125.56
If I use Amt = Right(Format(125.56*100,8,0),8,'0') it displays
bbb12556
Any suggestions for a good REXX forum
Ewart:
I'd say that the Midrange-L list is the forum of choice here. There
are also various REXX newsgroups available.
However, you might want to look at the problem from a slightly
different direction --
( 125.56 / 1000000 ) should result in .00012556
By moving the decimal point to the _left_ instead of the right, you
can generate strings of digits with however many leading zeros you
need. Then you only need to cut off the leading decimal point.
Tom Liotta
--
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone 253-872-7788 x313
253-479-1416
Fax 253-872-7904
http://www.powertech.com
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.