Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

REORGANIZE-LIBRARY

The REORGANIZE-LIBRARY statement reorganizes a library in such a way that as much as possible of the disk space not used for members is left for the library file, which is then released. This reduces the amount of disk space required for a library.

REORGANIZE-LIBRARY

LIBRARY = *STD / <filename 1..54 without-vers> / *LINK(...)


*LINK(...)



|

LINK-NAME = <structured-name 1..8>

LIBRARY = *STD / <filename 1..54 without-vers> / *LINK(...)
Specifies the library which is to be reorganized.

LIBRARY = *STD
Reorganizes the library which was globally opened by means of OPEN-LIBRARY.

LIBRARY = <filename 1..54 without-vers>
Reorganizes the library with the name specified here.

LIBRARY = *LINK(...)
Reorganizes the library assigned by means of the link name.

LINK-NAME = <structured-name 1..8>
Link name of the library, which was declared with a /ADD-FILE-LINK command.

Statement return code

(SC2)        SC1

Maincode

Meaning

0
1
32
64
130
130

CMD0001
CMD0230
LMS1002
LMS1004
LMS0041
LMS0411

No error
Syntax error
Internal error
Other error
System address space exhausted
Library locked

Required access rights

Ownership, read and write authorization for LIBRARY.

Notes

  • During a reorganization, no other access to the library is permitted (open mode: SHARUPD=NO). This is why a REORGANIZE-LIBRARY statement is rejected if the library is already open for a library application, e.g. through another task. If the library which is to be reorganized was opened earlier in the same LMS run, LMS implicitly closes the library before the reorganization, unless the LMS log is to be written to that library. In that case, users must themselves close the library by redirecting the log stream.

  • The disk space which remains reserved, but unused after the reorganization may be as large as the largest member in the library. If this minimum is not reached, e.g. because following a system error blocks at the back may already be reserved but are not yet used, or to minimize the size of the library, use a buffer for copying (COPY-LIBRARY).