Its pretty much working as designed.

My dimming memory says this is how I solved this same sort of issue: Immediately after the exfmt, do a write of the format, then do your validations.

If that works, great. If it doesn't, then my memory has gotten even worse.

On 2/8/2010 3:08 PM, Timothy Adair wrote:
Ok, I tried PUTOVR but it didn't work. I added (unconditional) PUTOVR at
the record level and (unconditional) OVRDTA on the field, and recompiled the
DSPF and the pgm. It was as if the keywords weren't even there (yes I
checked the compile listing to verify).

It may have something to do with the fact that we're running S/36
Environment, or the phase of the moon, or the price of tea... anyway, you
get the idea. Or maybe I'm just missing something? (nah.)

Not to beat the proverbial deceased equine, but if anyone has a quick
thought as to why this wouldn't be working, please enlighten me.

Otherwise, thank you all for all responses.

TA




"Timothy Adair"<tadair@xxxxxxxxxxxxxxxx> wrote in message
news:mailman.7074.1265648703.2580.midrange-l@xxxxxxxxxxxxxxx
I'm doing an extra Write if the user doesn't key in a decimal point.

write foot2;
exfmt scrn01;
if %int(futprc) = futprc;
futprc = futprc / 10000;
write scrn01;
endif;


That was before Dan's suggestion of using PUTOVR - I may try that instead;
it seems a bit more elegant.






"Alan Shore"<AlanShore@xxxxxxxx> wrote in message
news:mailman.7071.1265647998.2580.midrange-l@xxxxxxxxxxxxxxx

No problem
I'm curious.
What way around this have you found?



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



"Timothy Adair"
<tadair@prairiefa
rms.com> To
Sent by: midrange-l@xxxxxxxxxxxx
midrange-l-bounce cc
s@xxxxxxxxxxxx
Subject
Re: DSPF numeric field editing
02/08/2010 11:49
AM


That's it. That's the answer I needed.

Now that I know what's happening, I think I've found a way around this.

Thanks for the quick response (and my wall thanks you too).

TA




"Alan Shore"<AlanShore@xxxxxxxx> wrote in message
news:mailman.7062.1265646857.2580.midrange-l@xxxxxxxxxxxxxxx

Hi Timothy
I think that this will be the answer to your problem
As soon as an indicator associated with an ERRMSG is switched on, then any
change to the DSPF buffer is basically ignored
You can use debug and you will see that values on the DSPF change AFTER
the
index is switched on, but the DSPF display will NOT reflect that
We came across this a couple of years ago. The program acted as if it was
controlled by gremlins
If you look up ERRMSG in the ibm reference manual, this is as designed.
I hated it
We have since changed that program to use a message file instead, which
was
NOT a small project, but now that its complete - NO GREMLINS and things
are
displayed as expected


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



"Timothy Adair"
<tadair@prairiefa
rms.com> To
Sent by: midrange-l@xxxxxxxxxxxx
midrange-l-bounce cc
s@xxxxxxxxxxxx
Subject
DSPF numeric field editing
02/08/2010 11:26
AM


I've searched the archives but have been unable to find any previous
reference to this issue.

I have a DSPF with a numeric field (11,4) where the user is allowed to key
in a number with or without a decimal point. If they key in a decimal
point, then the program takes that number as the actual value. If not,
then
the program assumes 4 decimal places and divides the entered number by
10,000. (Please don't ask why - I've fought that battle and lost. Yes
our

users are still in the dark ages.)

So far, so good.

Let's say they key in the number "2" and press Enter. The program will
assume four decimal places and divide by 10,000.

So far, still good.

If there are no errors or messages, the program will go back to the first
screen and allow the user to select another record to be updated. But if
there is an error or message (my message, not system message) the program
loops around and does another EXFMT and the number shows up exactly as
they

keyed it in, ignoring any editing, even though the value is correct
(0.0002,
verified in Debug). I've tried an edit code and an edit word - neither
works.

Is there some kind of quirk with a numeric display field that ignores any
editing if there's an ERRMSG on?

Here is the field DDS:

A FUTPRC 11Y 4B 14 28COMP(GE .0000)
A DSPATR(PC)
A EDTWRD('0 . ')
A 41 ERRMSG('Price Below Cost. Press
F5-
A to override.' 41)
A 42 ERRMSG('No Cost Available' 42)
A 49 ERRMSG('Both fields are required'
4-
A 9)
A 40 ERRMSG('Abnormal price - press
ENTE-
A R to accept.')
A 40 COLOR(RED)


Please help... I now have a dent in my wall, and a headache.

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.