DEFINE DATA is the clause in IDCAMS DEFINE CLUSTER that lets you specify the data component: its name and, where supported, data-component-level attributes such as control interval size or volumes. Every VSAM cluster has a data component; when you run DEFINE CLUSTER you can omit the DATA clause and let IDCAMS generate a default data component name and use cluster-level parameters, or you can include the DATA clause to control the data component name and attributes explicitly. This page explains what DEFINE DATA is, when to use it, and what you can specify inside it.
In a DEFINE CLUSTER command, the cluster-level parameters (NAME, INDEXED/NONINDEXED, RECORDSIZE, KEYS, FREESPACE, CYLINDERS, etc.) apply to the cluster as a whole. The data component is created automatically; it is the physical storage that holds the records (or, for LDS, the byte stream). The DATA clause is the part of the command where you can define or qualify that data component: give it a specific catalog name and, in some environments, set attributes that apply only to the data component. Syntax-wise, the DATA clause comes after the closing parenthesis of the cluster parameters and is written as DATA ( ... ) with subparameters inside the parentheses.
You can omit the DATA clause entirely. If you do, IDCAMS still creates the data component and assigns it a default name. On many systems the default is the cluster name with a suffix such as .DATA (e.g. MY.FILE.KSDS.DATA). So the cluster is still usable; you just do not control the data component name or data-level options. You use the DATA clause when: (1) you want the data component to have a specific name (e.g. for naming standards or LISTCAT readability), or (2) you need to specify attributes at the data component level, such as CONTROLINTERVALSIZE or VOLUMES, that you want to apply only to the data component (for example when the index component is defined separately with different CI size or volume).
The DATA clause follows the cluster parameters and is followed by the INDEX clause for KSDS. General form:
123456789DEFINE CLUSTER ( - NAME(cluster-name) - ... cluster parameters ...) - DATA ( - NAME(data-component-name) - [ CONTROLINTERVALSIZE(n) ] - [ VOLUMES(volser) ]) - INDEX ( ... ) /* KSDS only */
The only parameter that is commonly required inside DATA when you use the clause is NAME, if you want an explicit data component name. The other parameters are optional and depend on your IDCAMS implementation. CONTROLINTERVALSIZE sets the CI size for the data component in bytes (e.g. 4096 or 8192). VOLUMES specifies the volume serial(s) where the data component is to be allocated.
| Parameter | Description |
|---|---|
| NAME(data-component-name) | The catalog name for the data component. Use this when you want a specific name (e.g. cluster.DATA) instead of the default. Must be unique in the catalog. |
| CONTROLINTERVALSIZE(size) | CI size in bytes for the data component (e.g. 4096, 8192). Affects how many records fit per I/O and free space. Often inherited from cluster level or default. |
| VOLUMES(volser) | Volume serial(s) for the data component. Used when you need to place data and index on different volumes or control placement. |
| RECORDSIZE / FREESPACE | Some IDCAMS versions allow these at the data level; typically they are specified at the cluster level and apply to the data component. |
NAME is the catalog entry name for the data component. It must be unique within the catalog and is usually derived from the cluster name (e.g. MY.APPL.KSDS.DATA). CONTROLINTERVALSIZE (or CISZ) sets the size of each control interval in the data component; this affects how many records fit in one I/O and how free space is calculated. If you do not specify it at the data level, the default or cluster-level value is used. VOLUMES in the DATA clause places only the data component on the specified volume(s); the index component (for KSDS) can be on different volumes if specified in the INDEX clause.
A full example that names both the data and index components:
12345678910DEFINE CLUSTER ( - NAME(MY.APPL.KSDS) - INDEXED - RECORDSIZE(100 100) - KEYS(12 0) - FREESPACE(10 5) - CYLINDERS(20 5)) - DATA (NAME(MY.APPL.KSDS.DATA) CONTROLINTERVALSIZE(4096)) - INDEX (NAME(MY.APPL.KSDS.INDEX))
Here the cluster is MY.APPL.KSDS. The DATA clause gives the data component the name MY.APPL.KSDS.DATA and sets the data CI size to 4096 bytes. The INDEX clause names the index component. Programs and JCL still reference only the cluster name MY.APPL.KSDS; the data and index component names are used internally by the catalog and the access method.
Most attributes that affect the data component (RECORDSIZE, FREESPACE, space allocation) are specified at the cluster level in DEFINE CLUSTER. They apply to the data component because the data component is where the records and free space live. The DATA clause is for the few attributes that are specifically tied to the data component as a separate catalog object: its name and, where supported, its CI size and volume placement. So you do not repeat RECORDSIZE or FREESPACE inside DATA unless your documentation says so; you set them once at the cluster level.
When you order a filing cabinet (cluster), the cabinet has a drawer where the papers (data) go. DEFINE DATA is where you give that drawer its own label (name) or say how big each section of the drawer is (CI size). You don't have to—the system can label it for you—but if you want a specific name or size, you use DEFINE DATA. The drawer is always part of the cabinet; you can't order just a drawer by itself.
1. Where does the DATA clause appear in IDCAMS?
2. What is the main reason to specify the DATA clause?
3. Can you create only a data component with DEFINE DATA?