Data Class
A Data Class is a component of the z/OS Storage Management Subsystem (SMS) that defines a set of physical and logical attributes for a dataset. It specifies characteristics such as record format (`RECFM`), logical record length (`LRECL`), dataset organization (`DSORG`), space allocation (`SPACE`), and retention period, which are then applied automatically during dataset allocation. Its primary purpose is to standardize and automate the creation of datasets, ensuring consistency and adherence to site standards.
Key Characteristics
-
- SMS Component: Data Class is one of the four fundamental constructs of SMS, alongside Storage Class, Management Class, and Storage Group.
- Dataset Attributes: It encapsulates various dataset attributes, including
RECFM,LRECL,BLKSIZE,DSORG(e.g.,PS,PO,VSAM),SPACE(primary/secondary quantity, unit),RETPD(retention period),EXPDT(expiration date),VOLUME COUNT, andKEYLEN/KEYOFFfor VSAM KSDS. - Automated Allocation: When a dataset is allocated and assigned a Data Class (either explicitly or via ACS routines), these predefined attributes are automatically applied, reducing manual errors and ensuring standardization.
- Storage Administrator Defined: Data Classes are defined and managed by storage administrators using ISMF (Interactive Storage Management Facility) or equivalent tools.
- Dynamic Override: While a Data Class provides default attributes, some can be overridden explicitly in JCL
DDstatements (e.g.,DCBparameters,SPACE). - Applicability: Applies to both non-VSAM (sequential, partitioned) and VSAM datasets, although specific attributes might be relevant only to certain dataset types.
Use Cases
-
- Standardizing Application Datasets: Defining specific Data Classes for critical application datasets (e.g., COBOL source libraries, load libraries, transaction logs) to ensure they always have the correct
RECFM,LRECL, and space parameters. - Automated Temporary Dataset Management: Creating Data Classes for temporary datasets (
&&DSN) that specify appropriate space allocation andEXPDT=0orRETPD=0to ensure they are automatically deleted at job end. - Batch Job Dataset Allocation: Using
DATACLASparameter in JCLDDstatements to assign a specific Data Class, simplifyingDCBandSPACEparameter specification.
jcl //MYDD DD DSN=MY.PDS.LIBRARY,DISP=(NEW,CATLG,DELETE), // DATACLAS=PDSLIBDC- Migration to SMS-Managed Environment: Facilitating the transition of existing non-SMS datasets to an SMS-managed environment by providing predefined attribute sets.
- Ensuring Consistent Performance Characteristics: While primarily defining logical/physical attributes, the choice of
BLKSIZEorSPACEunits can indirectly influence I/O performance.
- Standardizing Application Datasets: Defining specific Data Classes for critical application datasets (e.g., COBOL source libraries, load libraries, transaction logs) to ensure they always have the correct
Related Concepts
Data Class is intricately linked with the Storage Management Subsystem (SMS), forming the "what" aspect of dataset management by defining its characteristics. It is assigned to a dataset by Automatic Class Selection (ACS) routines, which are REXX-like programs executed by SMS based on dataset name, job name, and other criteria. Once a Data Class is assigned, SMS then uses the Storage Class (the "how" and "where" for performance and availability) and Management Class (the "when" for retention and migration) to fully manage the dataset. In JCL, the DATACLAS parameter on a DD statement allows explicit assignment or override of the Data Class determined by ACS routines.
- Standardize and Document: Define a comprehensive set of Data Classes that cover common dataset types and application needs, and thoroughly document their purpose, attributes, and intended use.
- Use Clear Naming Conventions: Implement consistent and descriptive naming conventions for Data Classes (e.g.,
DCVSAMKSDS,DCPDS80,DCTEMP) to make their purpose immediately clear. - Minimize Overrides: Design Data Classes to minimize the need for overrides in JCL, promoting consistency and reducing potential errors.
- Regular Review and Maintenance: Periodically review Data Class definitions and ACS routines to ensure they remain aligned with current system requirements, application needs, and storage policies.
- Test Thoroughly: Any changes to Data Classes or ACS routines should be rigorously tested in a non-production environment to prevent unintended impacts on dataset allocation and application behavior.