On 28-Oct-2015 12:21 -0500, darren wrote:
As to the *INLR closing files, yes the files will be closed in any
activation group, however, I've found that if you use SQL, there are
persistent access paths that leave low level locks on files you've
referenced after a program ends. For this reason, I prefer to
actually live in the 7th sin listed in Charles's link, ACTGRP(*NEW).

Presumably that would be the effect of pseudo-closed cursors. Thus to clarify, rather than each being an Access Path, each is an Open Data Path (ODP) that was left open [remain\persistent], instead of having been closed. And, the locks would be the /normal/ locks, as for any other Open. By not closing, both the use of temporary addresses and the actions of the creation and the destruction of the temporary object(s) that constitute each ODP could be additional resources that will not be consumed, for each time the ODP is later reused. Anyhow, and if so:

That is a strategy [i.e. choosing to use ACTGRP(*NEW)] that is quite capable of defeating attempts by the SQL to achieve better performance for the /repeated/ query requests performed by the program.

Some might prefer instead, just to code an occasional request within their programs to perform open_then_close(array_of_files) in order to mimic a similar effect ;-)

There are others however, who understand that those locks are almost never of any consequence, and in situations where they may be of concern [of note, that should be restricted to only non-SQL requests], the simple request to Allocate Object (ALCOBJ) using the Request Release (RQSRLS) as the Lock Conflict Action (CONFLICT) [followed by the respective Deallocate Object (DLCOBJ) request] can effect the removal of those locks [by effecting the full-close] from within the job that wants to access the file.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].