× 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 thought that removing the Share(*Yes) would keep the override only in
the current module, but when I did that, the file wasn't reflecting the
result set from the OpnQryF.

SHARE(*YES) means that you want to share the ODP. In other words, when OPNQRYF positions to a particular record, your program will read that record, because they're sharing the same open data path to the file. Without this setting OPNQRYF won't have any affect on your program.

It has no affect whatsoever on which modules the override applies to.

One option for the override to not propagate to the Maintenance module
is for me to create a new logical for that program to use.
But I was hoping there was another answer.  Can I somehow scope the
override to just the Selection module?

Why not simply DLTOVR to delete the override before calling the maintenance module? The override is only necessary when the files are opened (either with the OPEN op-code, or automatically when the RPG cycle gets to the right place). Once the file has been opened, the override is superfluous, and it's save to use DLTOVR. That way, the override won't affect anything else by mistake.

Another alternative is to put the maintenance module in a separate program or srvice program, so that it can be run in a different activation group. Then you can use OVRSCOPE(*ACTGRPDFN) on the OVRDBF command, and it'll only affect the actgrp that it was issued from.

Can I override the file again, and when I delete that override the previous override will take over?

If the overrides are at different levels, this'll work. If they're at the same level, the new override will replace the previous one.

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.