LIBRM UNLOCK (Unlock Library Member) Macro
The UNLOCK (MEMBER) function causes a library member that is locked for write or update access to be unlocked again.
The member must be fully qualified. It is unlocked only if the specified lockid matches the lockid with which this member was locked (with LIBRM LOCK). Only the lockid specification can be generic.
See also Library Macro Notation for details on register notation and possible operand specifications.
Format
Requirements for the caller
- AMODE:
- 24 or 31
- RMODE:
- ANY
- ASC Mode:
- Primary
Parameters
- LDCB=areaname
- Specifies the address of the LDCB (Librarian Data Control Block) for the request.
- LOCKID=lockid
- Specifies the lock identifier with which the member was locked
(with the corresponding LOCK function). The member is unlocked only
if the specified lockid corresponds with the lockid with
which this member was locked. The lockid is a string of up
to eight alphanumeric characters.
The lockid can also be specified generically by giving a prefix, followed by an asterisk (for example, PRE*). In this case, the specified member is unlocked only if it is locked with a lockid starting with the specified prefix. If LOCKID=* is specified, the member is unlocked if it is locked at all (with any lockid).
The lockid in the LDCB is cleared after processing.
- LIB=lib
- Specifies the address of an area where the library name (1 to 7 alphanumeric characters) is stored.
- SUBLIB=sublib
- Specifies the address of an area where the sublibrary name (1 to 8 alphanumeric characters) is stored.
- MEMBER=membername
- Specifies the address of an area where the member name (1 to 8 alphanumeric characters) is stored. No generic specification is allowed.
- TYPE=membertype
- Specifies the address of an area where the member type (1 to 8 alphanumeric characters) is stored.
- NOTFND=label
- Specifies a label to which the service branches, if the specified member does not exist (return code 8 for members that are opened for INPUT), or if the specified library or sublibrary does not exist or is not accessible (return code 12).
- EROPT=RET | CANCEL
- Defines an error handling option, which is taken, if the function
cannot be performed (return code > 12).
- RET
- Processing is continued, either by a normal return or by branching to the ERRAD exit.
- CANCEL
- Processing is canceled. A librarian error message is issued to SYSLOG.
- ERRAD=label
- Specifies a label to which the Librarian branches, if the above function cannot be performed because of an error (return code > 12).
Return Codes
Return Reason Meaning
Code Code
0 0 Member has been unlocked.
0 8 The macro is ignored, no member will be unlocked.
Option IGNLOCK is on.
4 0 The specified member was already unlocked.
8 0 The specified member does not exist.
4 The specified member is locked with a different lockid.
12 0 The specified sublibrary does not exist.
4 The specified library does not exist.
16 xx External system error with feedback code and message.
20 xx Internal system error with feedback code and message.
32 0 Access control failed (with message L163I).
The external system error feedback codes are described in Librarian Feedback Codes. All other (internal) feedback codes are described in http://publibfp.dhe.ibm.com/epubs/pdf/ieslde10.pdf.