Previous Topic: CLEANUPNext Topic: JCL Considerations


Usage

How to submit the CLEANUP statement

You submit the CLEANUP statement by using either the batch command facility or the online command facility. The batch command facility can run in local mode or under central version.

How CLEANUP works

An area sweep is performed on each specified area. When a logically deleted record is found, each set in which the record is a member is processed. Every logically deleted record in the set is first disconnected and then physically erased. When all sets in which the original record was a member are processed, the sweep of the area is resumed.

When to use CLEANUP

Use the CLEANUP utility:

When not to use CLEANUP

Records in sets with prior pointers are erased when they are deleted. If all the sets in an area have prior pointers, you never need to use the CLEANUP utility.

Journaling

You can use journaling while executing the CLEANUP utility to allow for recovery with the ROLLBACK utility.

LDEL counts

The number of logically deleted records (LDELs) reported in messages UT011020 and UT011021 reflect the number of LDELs encountered by the CLEANUP utility. Due to the architecture of how LDELs are removed, multiple LDELs might get removed for each one counted by the utility. To obtain an accurate count of the number of LDELs processed by the CLEANUP utility, a DBAN or PRINT SPACE report should be created for the requested area(s), both before and after the execution of the CLEANUP utility.