|
As to why a CLP would use SHARE(*YES) without OPNQRYF, there are two
common reasons I've encountered:
a) To improve performance. If you go many years back, when computers
had only kilobytes of memory, the cost (in terms of memory and
performance) of opening a file multiple times was very high. So if you
had multiple programs using the same file, you'd share the ODP so
they'd
all share the same file open, improving performance and reducing memory
footprint. IMHO, this is not a good practice today.
b) There was a common misconception that OVRDBF SHARE(*YES) in CL was
the equivalent of the // FILEDISP-SHR in OCL. People translating their
OCL's to CL's when converting from the S/36 would commonly replace
//FILE NAME-FOO,DISP-SHR to OVRDBF FILE(FOO) SHARE(*YES).
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.