Manage Learn to apply best practices and optimize your operations.

Consolidating DB2 dataset extents

You can use SMS on the mainframe to consolidate dataset extents easily and quickly without recovering the tablespace. Here's how.

This tip courtesy of Search390.com.

You can use SMS on the mainframe to consolidate dataset extents easily and quickly without recovering the tablespace.

Code

  1. From the TSO terminal panel 3.4 issue a LISTCAT command against a suspected dataset that reached 119 extents.
  2. Once you verify that the dataset reached 119 extents. Determine the tablespace which holds the dataset and stop this tablespace. Double-check to make sure the tablespace is stopped.
  3. Enter the following command on the command line in TSO opposite the dataset in 3.4. Here is the command: hmigrate. This will migrate the dataset in question.
  4. Wait a couple of minutes to let DFHSM migrate the dataset then listcat it to verify that it has been migrated.
  5. Then on the same command line opposite the migrated dataset issue, enter the following command: hrecall.
  6. Wait a few minutes to let DFHSM recall your dataset. Once it is recalled it will have all the extents consolidated in one primary extent.

Dig Deeper on Data backup, storage and retrieval on iSeries

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close