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



That is a possibility but it would really defeat the purpose of the dual-entry field. I'm trying to 'gently' push them toward keying the decimal point. If I give them a preference, they'll always choose without the decimal ("because that's the way it works now", to quote them).

I was hoping there was a simple way to determine if the user keyed an explicit decimal point into a numeric field. Overlaying didn't work, %char didn't work, etc.

We currently don't do service programs, or ILE for that matter. I have made it work in our main price maintenance program, but it was cumbersome and ugly. I have to:

1. Use an alpha field as the 'screen' price field, and a numeric work field.
2. Translate from alpha to decimal.
3. Manually verify that the data entered is numeric (without a %TESTN, hint, hint).
4. Manually edit check the length of the data entered.
5. Manually edit check the number of digits before the decimal.
6. Manually edit check the number of digits after the decimal.
7. Translate from decimal to alpha.

And some of these steps have to be performed in multiple places within the code.


Any final thoughts before I admit defeat on this?


~TA~





"Barbara Morris" <bmorris@xxxxxxxxxx> wrote in message news:mailman.38701.1279062397.2580.midrange-l@xxxxxxxxxxxxxxx
Timothy Adair wrote:
...
I'm currently converting a large quantity of old RPG II programs to free-format RPG IV, and the users want to be able to enter numeric fields, with or without keying in a decimal point. So I have to allow them to enter data either way, and determine which way they keyed it in, and display it with the decimal point.


Maybe you should have a preference, so during a given session the user has to always enter the data with or without the decimal point. That way you don't have to guess, and your users are happy. You'd have to use a character field for the input.

if preference = NO_DECPOINT;
val = %int(input) * .01;
else;
val = %dec(input:63:31);
endif;


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.