Migrating to DFSMShsm

If you decide to use DFSMShsm for your Db2 data sets, you should develop a migration plan with your system administrator.

About this task

With user-managed data sets, you can specify DFSMS classes on the Access Method Services DEFINE command. With Db2 storage groups, you can specify SMS classes in the CREATE STOGROUP statement, develop automatic class selection routines, or both.

Restriction: If you use the BACKUP SYSTEM utility to create system-level backups, do not use DFSMShsm to migrate Db2 table spaces and indexes. You can use DFSMShsm to migrate or recall archive log data sets.

Procedure

To enable DFSMS to manage your Db2 storage groups:

  1. Issue either a CREATE STOGROUP or ALTER STOGROUP SQL statement.
  2. Specify one or more asterisks as volume-ID in the VOLUMES option, and optionally, specify the SMS class options.

    The following example causes all database data set allocations and definitions to use nonspecific selection through DFSMS filtering services.

    Begin general-use programming interface information.

    CREATE STOGROUP G202
    VOLUMES ('*')
    VCAT vcat name
    DATACLAS dataclass name
    MGMTCLAS management class name
    STORCLAS storage class name;

    End general-use programming interface information.

  3. Define the SMS classes for your table space data sets and index data sets.
  4. Code the SMS automatic class selection (ACS) routines to assign indexes to one SMS storage class and to assign table spaces to a different SMS storage class.

Example

Begin general-use programming interface information.The following example shows how to create a storage group in a SMS managed subsystem:

CREATE STOGROUP SGOS0101
    VCAT REGSMS
    DATACLAS REGSMSDC
    MGMTCLAS REGSMSMC
    STORCLAS REGSMSSC;

End general-use programming interface information.