LIBRM CLOSE (Close Library Member) Macro
This macro closes the member that is addressed by the LDCB so that no further GET/PUT or NOTE/POINT access is possible.
The directory entry for a member opened for OUTPUT or INOUT is written to the sublibrary.
For a member opened for OUTPUT or INOUT it is possible to prevent (decommit) its cataloging into the directory by specifying COMMIT=NO. The original member (if any) stays in the sublibrary.
Empty members (members opened for OUTPUT or INOUT without a PUT request) are not cataloged.
For members opened for INOUT, the directory entry is written with the member name and member type, which is addressed in the LDCB at CLOSE time. Thus, it is possible to catalog the new member version under a different name while keeping the old version of the member in the sublibrary.
CLOSE clears member-related data like RECFM, RECNO, UNITS, and the options for the OPEN and CLOSE request in the LDCB and frees the resources (virtual storage space, locks, etc.) that OPEN used to construct and protect library control blocks and library objects.
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.
- COMMIT=YES | NO
- Is applicable only for a member opened for OUTPUT or INOUT:
- YES
- the member is cataloged (default).
- NO
- the member is not cataloged.
- 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 function cannot be performed because of an error (return code > 12).
Return Codes
Return Reason Meaning
Code Code
0 0 Member has been closed.
12 12 Library is full (for OUTPUT, INOUT).
New member has been purged, old kept.
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.