The requirements for the caller are:
Environmental factor | Requirement |
---|---|
Minimum authorization: | Supervisor state or PKM allowing key 0-7 |
Dispatchable unit mode: | Task or SRB |
Cross memory mode: | Any PASN, any HASN, any SASN |
AMODE: | 31-bit |
ASC mode: | Primary |
Interrupt status: | Enabled for I/O and external interrupts |
Locks: | No locks held |
Control parameters: | Control parameters must be accessible from the primary address space. |
If you specify an obtain_option of ISGLOBT_ASYNC_ECB (as described in Parameters), initialize the ECB pointed to by the value on the ECB_address parameter to zero before calling Latch_Obtain.
*
* Latch Obtain Option Equate Symbols
*
ISGLOBT_SYNC EQU 0
ISGLOBT_COND EQU 1
ISGLOBT_ASYNC_ECB EQU 2
*
* Latch Obtain Access Equate Symbols
*
ISGLOBT_EXCLUSIVE EQU 0
ISGLOBT_SHARED EQU 1
*
* Latch Obtain Equate Symbols
*
ISGLOBT_SUCCESS EQU 0
ISGLOBT_CONTENTION EQU 4
*
See the information about obtaining latches in z/OS MVS Programming: Authorized Assembler Services Guide for performance implications related to the Latch_Obtain service.
Write the call as shown on the syntax diagram. You must code all parameters on the CALL statement in the order shown.
Syntax | Description |
---|---|
CALL ISGLOBT |
|
All input to callable services is in the form of RX-type addresses.
The parameters are explained as follows:
Recovery routines can purge all granted and pending requests for a particular requestor (identified by a requestor_id) within a specific latch set. When specifying the requestor_ID on Latch_Obtain, consider which latches would be purged if the Latch_Purge service were to be called with the specified requestor_ID. For more information about the Latch_Purge service, see ISGLPRG — Purge a requestor from a latch set.
When you specify this option, the ECB_address parameter must contain the address of an initialized ECB that is addressable from the home address space (HASN).
If you specify an obtain_option of ISGLOBT_ASYNC_ECB (value of 2) and the system returns a return code of ISGLOBT_CONTENTION (value of 4) to the caller, the system posts the ECB pointed to by the value specified on the ECB_address parameter when the latch manager grants ownership of the latch to the requestor.
The caller might encounter abend code X'9C6' for certain errors. See z/OS MVS System Codes for explanations and responses for these codes.
When the Latch_Obtain service returns control to your program, return_code contains a hexadecimal return code. The following table identifies return codes in hexadecimal and decimal (in parentheses), the equate symbol associated with each return code, the meaning of each return code, and a recommended action:
Return code and Equate Symbol | Meaning and Action |
---|---|
00 |
Meaning: The Latch_Obtain service
completed successfully. Action: None. |
04 |
Meaning: A requestor called
Latch_Obtain with an obtain_option of ISGLOBT_COND (value of 1) or ISGLOBT_ASYNC_ECB
(value of 2). The latch is not immediately available. Action: If the requestor specified an obtain_option of ISGLOBT_COND (value of 1), no response is required. If the requestor specified an obtain_option of ISGLOBT_ASYNC_ECB (value of 2), and the latch is still required, wait on the ECB to be posted when the latch manager grants ownership of the latch to the requestor. |
See LATCHX31 - How to call AMODE 31 latch devices for an example of how to call Latch_Obtain in assembler language.