Every table and index in DB2 for z/OS sits on VSAM linear data sets. You rarely type IDCAMS DEFINE CLUSTER. You create a storage group, point table spaces at it, and let Db2 plus SMS place extents on DASD. This page covers CREATE / ALTER / DROP STOGROUP, VCAT, storage paths, data set naming, DSSIZE, PRIQTY, SECQTY, extents, and the special cases of LOB, XML, and work files.
A STOGROUP is a Db2 catalog object, not an SMS storage group (though they work together). It names:
| Statement | Role |
|---|---|
| CREATE STOGROUP | Define VCAT, volumes or *, optional SMS classes |
| ALTER STOGROUP | ADD/REMOVE VOLUMES, change DATACLAS/MGMTCLAS/STORCLAS |
| DROP STOGROUP | Remove the catalog object when unused |
1234567891011CREATE STOGROUP HRSTO VOLUMES ('*') VCAT DB2T DATACLAS DB2DATA MGMTCLAS DB2MGMT STORCLAS DB2STOR; ALTER STOGROUP HRSTO DATACLAS DB2DATA2; DROP STOGROUP OLDSTO;
ALTER of SMS class names does not rewrite existing data sets. The next REORG, RECOVER, or LOAD REPLACE that deletes and reallocates the LDS picks up the new classes. ADD VOLUMES only matters for non-SMS lists. DROP fails if a database, table space, or index still uses the group.
VCAT is overloaded in conversation: the STOGROUP VCAT clause, and USING VCAT on CREATE TABLESPACE/INDEX. USING STOGROUP is Db2-managed. USING VCAT hlq is user-managed: you IDCAMS DEFINE the cluster first with the Db2 naming convention. PBG cannot grow user-managed parts by itself. Prefer STOGROUP.
Storage paths in the LUW sense (automatic storage paths) are not how z/OS works. On z/OS the “path” is SMS ACS routines plus the STOGROUP VCAT and classes. ACS looks at the data set name (DSNDBC.*) and assigns SMS storage class, management class, and SMS storage group (a pool of DASD volumes—different object from Db2 STOGROUP).
SMS-managed storage with VOLUMES (*) is the modern default. SMS storage classes can request guaranteed space, EA/EF, striping. Data class influences DCB-like attributes, extended format, and extended addressability—needed for data sets above 4 GB.
VSAM: Db2 uses linear data sets (LDS) and VSAM Media Manager. You do not use KSDS for table pages. I/O is CI-oriented; page size should match CI size (4 KB pages → 4 KB CI, and so on) or utilities like concurrent copy get picky.
| Kind | Name pattern | Note |
|---|---|---|
| Table space | cat.DSNDBC.db.ts.I0001.A001 | One LDS per part/piece; I0001 vs I0002 after REORG instance switch |
| Index space | Same pattern with index space name | NPSI is one piece; DPSI has a data set per part |
| LOB | Auxiliary table space LDS | Often EA, large DSSIZE; not the base table’s pages |
| XML | XML table space LDS | Separate from the base table; DOCUMENT/NODE storage |
| Work file | DSNDB07 (or work-file DB) spaces | Sorts, CGTT, overflow; size for peak queries |
Table space data sets: one LDS per partition or piece. After online REORG FASTSWITCH, instance I0001/I0002 flips. Index space data sets follow the same catalog naming with the index space name. LOB data sets belong to the LOB table space (auxiliary table), not the base table’s pages. XML data sets similarly sit in XML table spaces. Work file data sets live in the work-file database (often DSNDB07): 4 KB and 32 KB spaces for sorts, created global temps, and overflow. Undersized work files show up as resource-unavailable SQLCODEs in heavy SQL, not as STOGROUP DDL errors.
DSSIZE is the maximum size of a partition (or PBG part). It is not the primary allocation. A 64 G DSSIZE data set can still start at one cylinder.
PRIQTY is the primary quantity. SECQTY is secondary.SPACE in catalog reports (STOSPACE utility, RTS) is how much is actually used or allocated—not the DDL ceiling. Leaving PRIQTY/SECQTY off or coding -1 uses ZPARM TSQTY/IXQTY and the sliding-scale secondary algorithm (MGEXTSZ YES): early extents stay modest, later ones grow, which avoids a 255-extent death spiral on a badly sized object.
Extents are the chunks VSAM adds. Extent limits still exist (the exact maximum depends on SMS, EA, and z/OS level—far more than the old 255 on modern EA data sets, but “thousands of tiny extents” is still a performance and operational problem). SMS can consolidate adjacent extents. DSNACCOX can recommend REORG when extent counts explode.
12345678CREATE TABLESPACE HRTS IN HRDB USING STOGROUP HRSTO PRIQTY -1 SECQTY -1 DSSIZE 8 G SEGSIZE 32 MAXPARTITIONS 8;
DASD is the physical disks (or virtual volumes) SMS storage groups map to. Db2 does not pick a VOLSER when VOLUMES (*) is set—the storage administrator’s ACS does. Your job is a sensible DSSIZE, sliding-scale quantities, and a STOGROUP that points at the right SMS classes for production versus test.
A Db2 table is toys in labeled boxes (VSAM data sets) on warehouse shelves (DASD). A STOGROUP is the warehouse address and the rule “SMS, you pick the shelf.” VCAT is the building name stamped on every box. PRIQTY is how big the first box is; SECQTY is how much extra cardboard you add when it overflows (extents). DSSIZE is “this locker cannot grow past 8 gigabytes.” LOB and XML toys get their own boxes so the main box does not explode. The work-file room is extra tables where Db2 dumps puzzle pieces during a sort. User-managed VCAT is building every box yourself with a glue gun (IDCAMS)—possible, but the STOGROUP robot is better.
1. A Db2 STOGROUP is:
2. USING VCAT versus USING STOGROUP:
3. PRIQTY -1 and SECQTY -1 mean:
4. Db2 table and index data sets are which VSAM type?
5. VOLUMES (*) on CREATE STOGROUP means: