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



Hello Darryl,

Am 19.02.2020 um 18:01 schrieb dfreinkel <dfreinkel@xxxxxxxxxxxxxxxxx>:

I have had this issues for ever. I usually get it resolved but this time I
cannot.



I have a subfile with the usual ACTion column. The field is defined only in
the subfile and is used to execute an action example 4=Delete. I have tried
to move blanks to the field, but that does not resolve the problem. I see
the field being blanked in debug but the subfile retains it.

Problem:

The action is executed normally, but the 4 is not removed from the ACT
field. As a result, when I press ENTER again, it executes the action again.
This even happens when I clear SFLCLR and reload the subfile.

Depends on your code. What do I do?

When the SFL is shown and the user presses Enter to submit his desired action (Opt) Values, I'm going into a READC-Loop to check which values were passed as OPT and do EXSR depending on Opt-Value.

After the next line was read and returned, I write a *BLANK to the OPT-Field, which solves your particular problem.

I have two templates, one for a load-all and one for a load-paged SFL. I mention that, because a load-all is a throwaway-thing to me. So, at READC EOF, I just clear and reload the SFL. If you do *not* *BLANK Opt and interrupt the READC-Loop at a record with a selection in it, this Opt-Value will be copied to all records when reloading the SFL. :-)

For a Load-Paged SFL, after *BLANKing Opt, I do an UPDATE of the SFL afterwards. Beware: Before you can to an UPDATE, you need to READ (CHAIN) to that record in the SFL again. Since the SFL-RRN is the same, just read it.

But now you've read old data from the SFL! Not good. What to do?

Create an overlay DS over the PF, and a new, empty DS from that with LIKEDS and maybe a PREFIX, or use QUALIFIED. Before the mentioned CHAIN to the SFL record, MOVEL the Overlay Data to the Copy, do the READ, overwrite that old data again by EVAL O_PF = C_PF. (O=Overlay, C=Copy).

Another approach would be to directly CHAIN data into the storage, to not overwrite the implicit variables from your PF. I didn't test this yet but in theory it should work, and you save some code with moving stuff back and forth.

Hope this helps.

:wq! PoC

PGP-Key: DDD3 4ABF 6413 38DE - https://www.pocnet.net/poc-key.asc



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.