Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

CLOSLIB: close a library

CLOSLIB explicitly closes a library. The library cannot be closed if any of its members are still open. If there are still open members, or if any member of the library is locked against modification (LOCK), CLOSLIB is rejected with a return code of X ́18 ́ (illegal call
sequence).

Libraries are opened by any of the following functions:

ADD, COPY, COPYSTR, DEL, LOCK, LST, MODEA, MODEP, MODLA, MODTA, OPENGET, OPENPUT, OPENUPD, PROVIDE, REN, RETURN, SEL, SHOWLA, SHOWTA, TOCPRIM, TOCSEC.

For performance reasons, once libraries have been opened they remain opened. They are generally closed implicitly by the END function or when there is a resource bottleneck. A subroutine user generally does not know whether a given library is still open. Therefore CLOSLIB can also be applied to closed libraries, producing a return code of X ́00 ́ (OK).

When library lists are closed, there is no hit library, so no DMS file name can be determined. When library lists are used, the input in the NAME field of LD remains unchanged.

Call parameters

The parameter structures must be given in the following sequence in the subroutine call.

Parameter
structure

Field

Meaning

CB


SCBVERSION

FUNCTION

SUBCODE

ACC

LD-RETURN

Function control block

Interface version

Function code X'1C'

Subcode currently not used: UNUSE

Subroutine access identification

Full DMS file name in LD

LD


PASSWORD

LINK

MAX-NAME-LEN

NAME

Library descriptor

Password as per PASSWORD command

Link name

Maximum length of library name

Library name

 

Return parameters

Parameter
structure

Field

Meaning

CB


RETURNCODE

LMS-MSG

DMS-MSG

PLAM-MSG

Function control block

Return code

LMS message code

DMS message code

PLAM message code

LD


NAME

Library descriptor

Full DMS file name of library (dependent on LD-RETURN

field of CB)