Data set naming conventions

When you define a data set, you must give each data set a name that is in the correct format.

The correct format for the name of a data set is as follows:

catname.DSNDBx.dbname.psname.y0001.znnn
catname
Integrated catalog name or alias (up to eight characters). Use the same name or alias here as in the USING VCAT clause of the CREATE TABLESPACE and CREATE INDEX statements.
x
C (for VSAM clusters) or D (for VSAM data components).
dbname
DB2® database name. If the data set is for a table space, dbname must be the name given in the CREATE TABLESPACE statement. If the data set is for an index, dbname must be the name of the database containing the base table. If you are using the default database, dbname must be DSNDB04.
psname
Table space name or index name. This name must be unique within the database.

You use this name on the CREATE TABLESPACE or CREATE INDEX statement. (You can use a name longer than eight characters on the CREATE INDEX statement, but the first eight characters of that name must be the same as in the data set's psname.)

y0001
Instance qualifier for the data set.

Define one data set for the table space or index with a value of I for y if you do not plan to run the following items:

  • REORG with SHRLEVEL CHANGE or SHRLEVEL REFERENCE
  • CHECK DATA with SHRLEVEL REFERENCE
  • CHECK INDEX with SHRLEVEL REFERENCE
  • CHECK LOB with SHRLEVEL REFERENCE

Define two data sets if you plan to run the following items:

  • REORG with SHRLEVEL CHANGE or SHRLEVEL REFERENCE
  • CHECK DATA with SHRLEVEL CHANGE
  • CHECK INDEX with SHRLEVEL CHANGE
  • CHECK LOB with SHRLEVEL CHANGE

Define one data set with a value of I for y, and one with a value of J for y.

znnn
Data set number. The first digit z of the data set number is represented by the letter A, B, C, D, or E, which corresponds to the value 0, 1, 2, 3, or 4 as the first digit of the partition number.

For partitioned table spaces, if the partition number is less than 1000, the data set number is Annn in the data set name (for example, A999 represents partition 999). For partitions 1000 to 1999, the data set number is Bnnn (for example, B000 represents partition 1000). For partitions 2000 to 2999, the data set number is Cnnn. For partitions 3000 to 3999, the data set number is Dnnn. For partitions 4000 up to a maximum of 4096, the data set number is Ennn.

The naming convention for data sets that you define for a partitioned index is the same as the naming convention for other partitioned objects.

For simple or segmented table spaces, the number is 001 (preceded by A) for the first data set. When little space is available, DB2 issues a warning message. If the size of the data set for a simple or a segmented table space approaches the maximum limit, define another data set with the same name as the first data set and the number 002. The next data set will be 003, and so on.

You can reach the VSAM extent limit for a data set before you reach the size limit for a partitioned or a nonpartitioned table space. If this happens, DB2 does not extend the data set.