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



Will that also handle the 29-into-9 digits problem? That was why I added the %char() & %subst(last 9) route.

On 1/10/2013 11:17 PM, Peter Dow wrote:
I would've thought a simple

FieldB = %int(FieldA);

would do it. Or if it you want it rounded,

FieldB = %inth(FieldA);

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx>/

On 1/10/2013 3:45 PM, sjl wrote:
FieldA is defined as 29.4 and FieldB is defined as 9.0. The following
calculation bombs on "Receiver value too small to hold the result."

Eval FieldB = FieldA;

I know that I can switch back into fixed format and use:
Z-ADD FIeldA FieldB

and the value of FieldB will contain a truncated value if FieldA is too
large to fit in FieldB. However, is there a way to accomplish this in
free-form RPG?

I know that this sounds stupid, and please do NOT ask me why I need to do
this.

I was told that if the value won't fit, truncate it, and I just don't want
to junk up my pretty free-form program with fixed-form code.

- sjl





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.