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



On 03-Oct-2016 12:08 -0500, Rob Berendt wrote:
System table:
Object lock, yes. Record lock, not really.
[IBM i 7.3->Database->Performance and query optimization->IBM i Services->Work Management Services->OBJECT_LOCK_INFO view]
(https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqviewobjlockinfo.htm)


I do not specifically recall, despite locks *not* being *scoped* to programs, that the LIC Resource Management (RM) had [added] a capability to obtain some historical information [without much overhead] that would reveal that info. The above linked DB2 service implies the information is apparently available; though a quick test using an STRSQL UPDATE [with no user programs in the stack, ¿thus?] showed just the system-programs\procedures for the Open rather than a user-program.

I infer [though now, I have a faint ¿legitimate? recollection discussing such an enhancement with GChaney] that a pointer was in|added-to the lock-table data such that the executable [program\procedure] that had originally obtained the lock could be determined and presented [if the object was not since destroyed], with the request to materialize the held-locks information from whence they are scoped [process, thread, or lock-space]. I've not looked at the Materialize Process Record Locks (MATPRECL) or other similar MI instructions to see what I can find of the details possibly available there, for example, to compare that, with what is manifest via the APIs.

I would think the same info would be available for record locks too, though perhaps not, as there might not have been available storage in the lock table for entries specific to row resources vs the object resources. But if the info were there, then sad if\that the Display Record Locks (DSPRCDLCK) [nor the Display Member Record Locks nor the Display Job Record Locks] was updated to offer an F11=Alternate View to enable presenting that information, nor the msg CPF5027 "Record &6 in use by job &9."; a quick test showed nothing appeared for replacement variable (FMT) "&14" as *SYP, but again, I used STRSQL rather than a user program.

The value for the *Lock Request Handle* as obtained in the Retrieve Lock Information (QWCRLCKI) API to obtain locks for an object, can be "used to identify a handle to lock request process information. Using the [Retrieve Lock Request Information (QWCRLRQI) API](http://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/apis/qwcrlrqi.htm) and passing in this handle you can retrieve additional information about the program that requested this lock." No specific mention anywhere that I noticed about using that for record locks, though in a cursory look; there is an *Object lock handle*, but there is also reference to a *Lock request handle* near a Relative Record Number (RRN) in the same template -- I do not foresee ever coding to any of those APIs, just to try to find what is available.


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.