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



DSPF
-----
A FutprcA 12 B 14 28
A N45N48 DSPATR(PC)
A 40 COLOR(RED)
A CHANGE(33)




RPG
-----
D Futprc s 11 4 (Future price)
D FutprcA s 12 (Future price - Alpha)
...................................................................

FutprcA = %editc(Futprc : '3'); // stuff value into screen
write foot2;
exfmt scrn01;

// Verify valid numeric data
monitor;
if %scan( '.' : FutprcA ) > 0;
Futprc = %dec(FutprcA : 11 : 4);
write scrn01;
elseif ChangeFutPrc; // change indicator for Future Price field
Futprc = %dec(FutprcA : 11 : 4) / 10000; // allow user to not enter a decimal point
FutprcA = %editc(Futprc : '3'); // stuff value into screen
write scrn01;
endif;
on-error *ALL;
InvalidPrice = *on;
write scrn01;
iter;
endmon;


Please forgive me if the 'screen-wrap-gremlin' rears its ugly head. This is not line-for-line, but you get the idea.





"Charles Wilt" <charles.wilt@xxxxxxxxx> wrote in message news:mailman.38596.1279043056.2580.midrange-l@xxxxxxxxxxxxxxx
How are you defining the screen field?

What's you code look like now?

Charles

On Tue, Jul 13, 2010 at 11:30 AM, Timothy Adair <tadair@xxxxxxxxxxxxxxxx> wrote:
I want them to be able to do that. THEY want it to "work like the old
program" (assumed decimal) but I want to ease them into reality. So I'm
trying to make it work both ways to help transition them.

Example - our price field is 7,4. If they do not key in a decimal point, it
assumes 4 decimal places ("just like the old program"). If they explicitly
key in a decimal point, then the number is exactly what they keyed in.
Either way I then display the number with the decimal point.

I'm afraid that reading their minds just goes with the territory. In this
case I know what to do; I just need a simple way to do it. I could define
the screen field as alpha but that gets ugly because I have to translate
both directions. And we're talking about dozens of fields across hundreds
of programs. That's why I'm looking for a simple solution.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.