Specifying a latch's identity or usage

The resource manager of the application can call the ISGLID and ISGLID64 service to identify how an individual latch is being used at any point in time. The ISGLID and ISGLID64 service provide a latch set creator with the ability to attach a latch identity array (in ISGLMASM or ISGLMC) to the latch set. By using a LIDArray, individual latch usage attributes including a description and thresholds can be identified. The latch attributes are defined by the latch owner. Depending on the dynamic nature of each latch, the latches usage attributes might never change and are assigned once or are initiated to not in use, changed after obtaining the latch, and reset to not in use before releasing the latch. The effect on performance should always be evaluated when using dynamic latch attributes. Ensure that LIDArray is in the primary space.

After the LIDArray has been attached to the latch set, it cannot be deleted. However the Latch Identity Pointer Array can be replaced by calling the service again and specifying a new array. To change the Latch identity for a particular latch, allocate a new latch identity block, fill it out, and update the corresponding array entry. Then the program is free to delete the previous latch identity block.

The Latch identity provides attributes that are related to the current usage of a given latch. The attribute includes threshold values and a printable description of the usage of the latch. The description is displayed on the D GRS,ANALYZE,LATCH command to provide the meaning of a specific latch usage. The thresholds are used by the system to determine when contention or hold times are abnormal. Non-zero threshold values should be carefully planned as users of the D GRS,ANALYZE,LATCH command may not see latches reported as in contention until the specified latch threshold values have been exceeded.

The identity can also be used to find more detailed component information about the latches usage. Any displayable text can be used. See z/OS MVS Diagnosis: Reference for how other components have provide diagnosis information for the latches.

See the following example for how to specify the thresholds and printable string.
LIDHOLDTHRESHOLD DS F 
The time in seconds that is not normal for this latch to be held. With this field, a value of X'00000000' is deemed to mean "take the default". This allows users to not have to specify the default value of X'FFFFFFFF' in every entry. The default value indicates that no matter how long this latch is held, it should not be treated as an exception. An example usage of this field would be for an application to issue a message if it were to find a latch held for a time period longer than that specified here, even if no contention exists.
LIDCONTTHRESHOLD DS F
The time in seconds that is not normal for this latch to be in contention. For example, when D GRS,ANALYZE,LATCH,BLOCKER and D GRS,ANALYZE,LATCH,WAITER process this element, it will be ignored unless the current longest waiter’s wait time exceeds this threshold. A value greater than X'1D55600' (one year) will be treated by these commands as an indication to never display this latch.
LIDPRINTABLESTRING@ DS AD
Address of printable (EBCDIC) string
LIDPRINTABLESTRINGLENGTH DS H
Length of printable (EBCDIC) string

For more information about how to use the ISGLID service, see the ISGLID and the ISGLID64 topics in z/OS MVS Programming: Authorized Assembler Services Reference EDT-IXG.