Start of change

Clearing data partitions by using LOAD

You can use the LOAD utility to efficiently delete all data in a data partition so that the partition can be reused.

Procedure

To clear a data partition:

  1. Unload the data from the partition by using the UNLOAD utility.
    This step ensures that the data is archived for any future reference.
  2. Load 0 (zero) rows into the data partition by using the LOAD utility with the following specifications:
    • In the JCL, specify an empty input data set or DD DUMMY as the input data set. (Such a data set indicates that no rows are to be loaded.)
    • FL 506 In the LOAD utility statement, specify the options INDEXDEFER NPI NOKEYDELETE SHRLEVEL NONE.
    This LOAD operation clears the data partition. The utility can quickly reset and reformat the individual partitions for affected data and partitioned indexes.
    FL 506 Any affected logical partitions of nonpartitioned secondary indexes (NPSIs) are placed in REBUILD-pending empty (RBDPM) status, and no keys are deleted from those logical partitions. All logical partitions of the NPSI remain available for read access. For details about when insert, update, and delete operations are allowed for RBDPM status, see REBUILD-pending status.
  3. FL 506 If the RBDPM state was set on any logical partitions, run REORG INDEX SHRLEVEL CHANGE to clean up the NPSI and reset this state.
  4. Optional: Run the ALTER TABLE statement with the ROTATE RESET clause to set the new limit key for the partition with the new limit key range.
End of change