|
Try shared opens. Someone started down this path, but didn't quite
get to the end of it. You need a program at the beginning of the
process that reads through and opens each file in your control file
with SHARE(*YES). Leave them all open. Now call your current program,
and the only change you need to make is to set your override to use
SHARE(*YES). It will pick up the already opened file, and though it
is closed by the program, the open data path will stay open for the
previous program that is holding all the files open. The ODP's won't
close until all the opens with SHARE(*YES) are closed. That won't
happen until the job ends.
You could probably even do the initial opens within your RPG program,
but you will still have to execute the CL commands OVRDBF SHARE(*YES)
and OPNDBF for each file named in your control file. That will get
you open data paths without having to link them to your RPG file
declaration leaving you free to open and close that as many times as
you want.
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.