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



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

I haven't seen it in years, but I used to see reports (especially error
reports) tied together through this method. If OVRPRTF errorprint
SHARE(*YES) is issued before the first program opens ERRORPRINT, then the
resultant output of all programs that open ERRORPRINT within that job will
be interspersed.

Note that I didn't comment on whether I considered it good practice.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"I believe that this country's policies should be heavily biased toward
nondiscrimination."
-- US President Bill Clinton




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.