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



[apologies if this is a repeat; wasn't sure it was sent the first time]

I did the following and everything worked as expected.

First I created two dummy tables

create table myschema.testovr1 (a_column smallint)
  rcdfmt rtestovr;
create table myschema.testovr2 like testovr1
  rcdfmt rtestovr;


Then the RPGLE

**free

dcl-f testovr1 disk(*ext) usropn;

dcl-pr cmd_pr extpgm('QCMDEXC');
  cmd    char(45)     const;
  cmdlen packed(15:5) const;
end-pr;

cmd_pr('ovrdbf testovr1 tofile(testovr2)':32);
open testovr1;
close testovr1;

cmd_pr('ovrdbf testovr1 tofile(testovr2) share(*yes)':45);
open testovr1;
close testovr1;

*inlr = *on;


Notice no OVRSCOPE or OPNSCOPE on the OVRDBF.

I started debug on the program and set a breakpoint on the first close.  I called the program and, when it broke before closing the file, I looked at the open files for the job from another session. The program had TESTOVR2 opened, as hoped for.  I stepped through the program to the next close, looked at the open files again, and this time TESTOVR2 was opened with sharing.

This was on a 7.3 system.

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.