|
|
NM and CM callable.
Locks a global resource identification number (RIN). Multiple RIN (MR)
capability is required to lock more than one global RIN simultaneously.
Syntax
I16V U16 CA
LOCKGLORIN (rinnum, lockflag, rinpassword);
Parameters
- rinnum
16-bit signed integer by value (required)
Passes the RIN of the resource to be locked. This is the RIN furnished in
the GETRIN command.
- lockflag
16-bit unsigned integer by reference (required)
Passes and returns conditional or unconditional RIN locking specification
through bit (15:1):
Value | Meaning |
0 | Locking takes place only if the RIN is currently
unlocked. If the RIN is not unlocked, control returns to the calling
process immediately with the condition code CCG (0). |
1 | Locking takes place unconditionally. If the RIN is
currently locked, the calling process suspends until the RIN becomes
unlocked. |
All other bits are ignored. See the discussion of condition codes for the
values returned in lockflag.
- rinpassword
character array (required)
Passes the RIN password assigned through the GETRIN command.
This array must be a minimum of 10 bytes in length and must be terminated
by a nonalphanumeric ASCII character; a blank is recommended.
Condition Codes
The following condition codes are possible if lockflag bit
(15:1)=1:
CCE (2) | Request granted. If the calling process has already
locked the RIN, lockflag bit (15:1) is set to 0. If the RIN
is free, lockflag bit (15:1) is set to 1. |
CCG (0) | Not returned. |
CCL (1) | Request denied. Invalid RIN was specified. Either
rinnum is not a global RIN, or the value is out of bounds
for the RIN table. |
The following condition codes are possible if lockflag bit
(15:1)=0:
CCE (2) | Request granted. If the calling process has already
locked the RIN, lockflag bit (15:1) is set to 0. If the RIN
is free, lockflag bit (15:1) is set to 1. |
CCG (0) | Request denied. The RIN was locked by another job. |
CCL (1) | Request denied because of invalid RIN. Either
rinnum is not a global RIN, or the value is out of bounds
for the RIN table. |
Operation Notes
The LOCKGLORIN intrinsic can lock any global RIN assigned to a group
of users, one process at a time. When this is done, any other processes that
attempt to lock this RIN are suspended.
To use the LOCKGLORIN intrinsic, the RIN number and the RIN password
must be known. Multiple RIN (MR) capability is required to lock two or more
global RINs simultaneously. If you do not have MR capability and attempt to
lock two or more RINs simultaneously, the LOCKGLORIN intrinsic aborts
the calling process and prints the following error message:
ONLY ONE RIN CAN BE LOCKED
Lock global RINs using the LOCKGLORIN and FLOCK intrinsics.
Related Information
|