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



David

You do not say what calls RPG2 - if CL1 calls the OVRDBF SHARE(*YES) and then calls RPG1, which opens the file, then RPG1 calls RPG2 which also "opens" the file, RPG2 is using the same ODP as RPG1. Whatever you do in RPG2 as far as reading a different record, that will change what RPG1 sees when control returns to it. Of course, the type of open has to be the same throughout the call stack.

SHARE(*YES) is used with OPNQRYF because you actually get an ODP in the CL program. When you call the RPG, the file being opened will use the ODP from the CL, which is exactly what you want. If you did not have the SHARE(*YES), the RPG would try to open the actual physical or logical file instead of getting the results of running OPNQRYF.

HTH
Vern

David FOXWELL wrote:
-----Message d'origine-----
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Wintermute, Sharon
Envoyé : mercredi 3 mars 2010 15:35
À : Midrange Systems Technical Discussion
Objet : RE: ovrdbf SHARE parameter

It can also be used on the display file when multiple programs use the same display file and you only want one copy in memory.
Sharon Wintermute



Vern, Sharon,

Your examples concern a file that stays open between different calls from different programs, I think. In my case the file is overridden with share(*yes) then RPG1 processes the file as a primary file, then RPG2 does the same. So I think that the share parameter has no effect here?

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.