× 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.




Morning everyone

Like the subject says, I thought I knew how %dec worked
Here is my code

d Bxwegt s 5 inz('01800')
D Bywegt s 5p 2
*-------------------------------------------------
* Stand Alone Fields - BOTTOM
*-------------------------------------------------

**************************************************
/FREE
Bywegt = %dec(Bxwegt: 5: 2);

*inlr = '1';
return;
/END-FREE

Pretty simple and straight forward, but when I run this, I get the
following error message
Message ID . . . . . . : RNX0103 Severity . . . . . . . : 99
Message type . . . . . : Diagnostic
Date sent . . . . . . : 11/10/10 Time sent . . . . . . :
13:00:14
Message . . . . : The target for a numeric operation is too small to hold
the result.
Cause . . . . . : An arithmetic operation resulted in a value which is
too
large to fit in the target. If this is a numeric expression, the
overflow
could be the result of the calculation of some intermediate result.
Recovery . . . : Either make the target of the operation larger or, if
in
an expression, choose the precision of the operands in the expression so
that intermediate value will fit into the intermediate result.

I increased the field Bywegt to 6p 2, with the same result

Am I missing something?
Oh, before I forget (like I almost ALWAYS do) we are at V5r4

As always, any and all answers MUCH appreciated


Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.