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. |
*
* Latch Release Option Equate Symbols
*
ISGLREL_UNCOND EQU 0
ISGLREL_COND EQU 1
*
* Latch Release Return Codes
*
ISGLREL_SUCCESS EQU 0
ISGLREL_NOT_OWNED_ECB_REQUEST EQU 4
ISGLREL_STILL_SUSPENDED EQU 8
ISGLREL_INCORRECT_LATCH_TOKEN EQU 12
*
See the information about releasing latches in z/OS MVS Programming: Authorized Assembler Services Guide for performance implications related to the Latch_Release service.
Write the CALL as shown on the syntax diagram, coding all parameters in the specified order.
Syntax | Description |
---|---|
CALL ISGLREL |
|
All input to callable services is in the form of RX-type addresses.
The parameters are explained as follows:
The caller might encounter abend code X'9C6' for certain errors. See z/OS MVS System Codes for explanations and responses.
When the Latch_Release 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_Release service completed
successfully. The caller released ownership of the specified latch
request. Action: None. |
04 |
Meaning: The requestor that originally
called the Latch_Obtain service is still expecting the system to post
an ECB (to indicate that the requestor has obtained the latch). The
call to the Latch_Release service specified a release_option of ISGLREL_COND
(value of 1). The latch manager does not post the ECB at the address
specified on the original call to Latch_Obtain. The latch manager
releases the latch. Action: Validate the integrity of the resource associated with the latch (the requestor might have used the resource without waiting on the ECB). If the resource is undamaged, no action is necessary (a requestor routine may have been in the process of cancelling the request to obtain the latch). |
08 |
Meaning: Program error. The request specified
a correct latch token, but the program that originally requested the
latch is still suspended and waiting to obtain the latch. The latch requestor originally specified an obtain_option of ISGLOBT_SYNC on the call to the Latch_Obtain service. The call to the Latch_Release service specified a release_option of ISGLREL_COND (value of 1). The latch manager does not release the latch. The latch requestor remains suspended. Action:
|
0C |
Meaning: The latch manager could not find
a granted or pending request associated with the value on the latch
token parameter. The latch manager does not release a latch. This return code does not indicate an error if a routine calls Latch_Release to ensure that a latch is released. For example, if an error occurs when a requestor calls the Latch_Obtain service, the requestor's recovery routine might call Latch_Release to ensure that the requested latch is released. If the error prevented the requestor from obtaining the latch, the recovery routine receives this return code. Action: If the return code is not expected, validate that the latch token is the same latch token returned to the caller of Latch_Obtain. |
See LATCHX31 - How to call AMODE 31 latch devices for an example of how to call Latch_Release in assembler language.