× 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 have an 12,5 decimal field. I need to split it into the whole number and the fractional part, two fields, one 7,0 and the other 5,5.

Put another way, if the original field is 1234567.98765 I want to end up with two field, one 1234567 and the other 0.98765.

Is there an elegant way to do this in RGP /free at V7R1?

The original RPG IV fixed format code did it with two Z-ADDs. (Without comments and meaningful field names, so very hard to understand.)

Thanks,

Sam

I could create a procedure, probably using multiplication and %REM.

I have an aversion to data structures for things like this, though if I put it in a procedure it would be fairly clear.

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.