|
Use OVRDBF with OVRSCOPE(*JOB) and
>> SHARE(*YES) and it should work.
Why OVRSCOPE(*JOB)?!?!
I believe there may be some confusion between OVRDBF OVRSCOPE and OPNQRYF OPNSCOPE. Not that either has anything to do with running OPNQRYF via QCMDEXC from RPG. The following snippet retrieves only the records included in the qryslt (showing that the share and open are working as desired):
d opnqry s 256 d cmdlen s 15p 5 c eval opnqry = 'opnqryf master + c qryslt(''PNPA *NE 1'') + c keyfld(pnpa pexc pnum psuf) + c opnscope(*actgrpdfn)' c eval cmdlen = %size(opnqry) c call 'QCMDEXC' c parm opnqry c parm cmdlen c eval opnqry = 'ovrdbf master share(*yes)' c call 'QCMDEXC' c parm opnqry c parm cmdlen c open masterBottom line is that from the same call level, one doesn't need to use OVRDBF OVRSCOPE(*JOB). Nor does one need to use OPNQRYF OPNSCOPE(*JOB). The default values, *ACTGRPDFN do what one expects.
--buck
As an Amazon Associate we earn from qualifying purchases.
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.