ONXREORG Reorganise Libraries/ISAM Files

ONXREORG ['str1'=...] [, par]

The marked libraries/ISAM files will be reorganised, in so far as all elements/ records will be transferred to a new library/file.

The REORG Variable Action will remove "holes" from a library created by frequent deletions and additions to and from the library. The library will be "repacked", and will occupy less space afterwards.

'str1'=... The name of the library to be reorganised is constructed such that a search is made in the name of the library or ISAM file for 'str1', and if found, will be replaced by 'str2'. By definition, every name is suffixed with a blank string '_', and prefixed with an empty string ''

For more information on Name transformation rules see page 5-.

If the name does not contain 'str1', the REORG Variable Action will not be executed for this data object.

If the 'str1'='str2' operand is omitted, the temporary file created will be copied back to the original library, and surplus space will be released (/FILE ..,SPACE=-9999). The temporary file will then be erased.

par [:x:] [,smspar] | vsn/device | PAD=nn | NR | DF[O] | SPACE=(xxxx,yyy)

:x: The reorganised library and the temporary file will be created on the specified Public Volume Set.

smspar If the library to be reorganised, or the temporary file necessary for a reorganisation is to be created on an SM pubset (System Managed pubset), then this parameter, in conjunction in with the defaults set by the system administrator, can be used to determine the location (Volume set) of the file.

AVAILABILITY=HIGH

The file should be created within an SM pubset on a Volume set designated as high availability (e.g. a DRV mirrored volume).

STORAGE-CL=class

Name of a Storage class created by the system administrator. A Storage class determines the Volume set for a file, and hence the storage attributes such as Performance Attribute, Availability etc.

VOLUME-SET=vset

Determines the Volume set, on which the file should be located within the SM pubset. The system administrator can specify a Volume set explicitly, either with *CONTROL or a one to four character Cat-Id vset (without the ':').

The non-privileged user can only specify a Volume set if the system administrator has granted physical allocation rights.

WORK-FILE=YES|NO

Specifies whether the file is a Work file, and hence whether it may be deleted by the system administrator after a specified time. Work files are located on a Volume set which has been designated as WORK by the system administrator.

vsn/device The reorganised library and the temporary file will be created on the specified private device.

Note:

The following procedure should be followed if the temporary file is to reside on multiple private volumes, or if it should be created on any other special storage medium:

Create a file of a sufficient size on the required volume, using any name (with the exception of CFS.REORGFILE). Make this file known to CFS with the following command: /FILE file,LINK=CFSREORG. From now on, any reorganisation will be executed using this file as the work file. This work file will not be deleted following the reorganisation, as is usually the case. The contents can be deleted with an /ERASE file,DATA command. The space reservation will remain.

nn optional PAD factor for the reorganised file. This is only valid when reorganising ISAM files. PAD=nn can be entered concurrently with :x: or vsn/device (separated by a comma).

NR No Release of free Space. Allocated space not yet used will not be released after the reorganisation. This space can be used by the file/library at a later date.

Standard: Surplus space is released.

DF[O] Defragment [Only]. Before copying back the reorganised temporary file the disk space occupied by the original file is released with /ERASE ..., SPACE, and the required space requested anew. Normally, this will result in a reduction of the number of extents needed for the file. The defragmentation is particularly efficient if the temporary file is created on a private volume, or on a different pubset (ONXREORG :x:,DF).

DFO: Only the defragmentation is carried out. "Holes" in the library or ISAM file will not be released.

Standard: Defragmentation disabled for libraries and ISAM files, and enabled for all other files.

SPACE= A FILE command will be executed with the specified SPACE parameter following the successful reorganisation. Surplus space can be released, and the secondary allocation modified simultaneously (e.g. SPACE=(-9999,30) ).

Standard: Surplus space is released. The secondary allocation is not modified.

MODE=CFS|LMS

This parameter determines the reorganisation method for PLAM libraries.

MODE=CFS CFS-internal, basic reorganisation. This method consists of moving all elements to a new library. The newly-created temporary library will be copied back to the original library, and then deleted. This method achieves optimal reorganisation results, but takes significantly longer than the LMS method (see below), particularly with large libraries.

MODE=LMS LMS offers its own reorganisation method, as from Version 3.0. This operates in place, that is, without the individual elements being moved. The library will finally be copied back. This method results in the reorganisation being achieved in the shortest possible time. Under certain conditions, it can result in fewer pages being released than by the CFS method. MODE=LMS will be ignored if the PLAM library is being reorganised by being renamed to a second library.

Standard: MODE=CFS.

The default method can also be changed to MODE=LMS in CFSMAIN.

Notes:

ONXREORG... will also reorganise any ISAM files. All records will be copied to a temporary file.

The 'str1'='str2' variant has the additional advantage over the simple variant (where the original is overwritten) of using minimal file extents when the new file is created.

When reorganising PLAM libraries, the Creation Date of all elements is set to the current date (AGE=0). The User Date for each element is not amended. Refer also to the UDAT command. This command will cause the AGE to be calculated on the basis of the User Date, and not from the Creation Date, which cannot be varied. A full description of the UDAT command can be found on page 18-.

Examples:

ONXREORG ' '='.REO'

The libraries marked with X will be reorganised into new libraries, whose names will be suffixed with '.REO' .

e.g. CFS.S.LMSLIB --> CFS.S.LMSLIB.REO.

ONXREORG''='REORG.'

The libraries marked with X will be reorganised to new libraries whose names will be prefixed with 'REORG.' .

e.g. CFS.S.LMSLIB --> REORG.CFS.S.LMSLIB.

ONXREORG PVT001/D3475

The flagged libraries will be reorganised. The necessary temporary files will be created on the private volume PVT001. The temporary file will overwrite the original file following a successful reorganisation.