Modernization Hub

CMPAT - Compatibility

Enhanced Definition

In the IBM z/OS environment, `CMPAT` (Compatibility) is a parameter primarily used within `DFSMS` (Data Facility Storage Management Subsystem) constructs, specifically `DATACLAS` (Data Class) and `STORCLAS` (Storage Class) definitions. It dictates how certain dataset attributes, most notably `RECFM` (Record Format), are handled during dataset allocation, determining whether `JCL` or program-specified attributes override `SMS` policy definitions. CMPAT (Compatibility) is a COBOL compiler option used within IBM Enterprise COBOL for z/OS to control the level of language compatibility for a COBOL program. Its primary purpose is to allow programs written for older COBOL compilers, such as OS/VS COBOL or VS COBOL II, to be compiled and executed on newer compilers with minimal or no source code modifications.

Key Characteristics

    • SMS Context: CMPAT is a keyword parameter defined within DATACLAS and STORCLAS definitions, which are integral parts of the DFSMS policy.
    • Record Format (RECFM) Control: Its primary function is to control the precedence of the RECFM attribute during dataset allocation.
    • Parameter Values: Typically takes values of YES (or Y) or NO (or N).
    • CMPAT=YES: Allows the RECFM specified in the JCL or application program to override the RECFM defined in the DATACLAS.
    • CMPAT=NO: Enforces the RECFM specified in the DATACLAS, overriding any RECFM specified in the JCL or program.
    • Dataset Allocation Impact: Directly influences the final attributes of a new dataset, particularly for sequential and VSAM datasets, ensuring attribute consistency or flexibility.
    • Policy Enforcement: When set to NO, it acts as a strong policy enforcer, ensuring that datasets conform to the storage administrator's defined RECFM standards.

Use Cases

    • Migrating Legacy Applications: Setting CMPAT=YES in a DATACLAS allows older applications that hardcode RECFM in their JCL or programs to continue functioning without modification, respecting their specified record format.
    • Standardizing Dataset Attributes: For new development or modern applications, using CMPAT=NO ensures that all datasets allocated under a specific DATACLAS adhere to a predefined RECFM, promoting consistency and simplifying data management.
    • Preventing RECFM Mismatches: CMPAT=NO can be used to prevent errors caused by RECFM mismatches between JCL and DATACLAS definitions, ensuring data integrity and application stability.
    • Enforcing VSAM Dataset Standards: Can ensure that VSAM datasets (e.g., KSDS, ESDS) are allocated with specific RECFM attributes required by the application or database system, regardless of JCL specifications.

Related Concepts

CMPAT is tightly integrated with DFSMS and its core components, especially DATACLAS and STORCLAS. Its behavior is determined by ACS (Automatic Class Selection) routines, which select the appropriate DATACLAS based on dataset characteristics. It directly impacts how JCL parameters, particularly those related to DCB (Data Control Block) and DSORG (Dataset Organization), interact with SMS policies during dataset allocation. It fundamentally relates to RECFM (Record Format), a crucial dataset attribute defining how records are stored.

Best Practices:
  • Default to CMPAT=NO for New Datasets: For new applications and datasets, it is generally best practice to set CMPAT=NO in the DATACLAS to enforce SMS policy and ensure consistent, standardized dataset attributes.
  • Use CMPAT=YES Judiciously: Reserve CMPAT=YES for specific legacy applications that cannot be easily modified, carefully documenting its usage and potential implications for data consistency.
  • Review ACS Routines: Ensure `

Related Vendors

ASE

3 products

IBM

646 products

CSI International

33 products

Candle Corporation

16 products

Related Categories

Programming Language

104 products

COBOL

53 products

Performance

171 products