Integrity - Correctness
In the mainframe context, "Integrity - Correctness" refers to the accuracy, consistency, and reliability of data and system operations. It ensures that data remains valid and uncorrupted according to predefined rules, and that the z/OS operating system and its applications function as expected without unauthorized interference or accidental damage.
Key Characteristics
-
- Data Integrity: Guarantees that data is accurate, consistent, and valid throughout its lifecycle, adhering to predefined business rules and constraints (e.g., referential integrity in DB2, data type validation).
- System Integrity: Ensures that the z/OS operating system and its core components are protected from unauthorized modification or corruption, maintaining a stable and secure environment for all applications and users.
- Transaction Management: Mechanisms like two-phase commit (2PC) in Resource Recovery Services (RRS) ensure that database updates and other resource changes are either fully completed (
COMMIT) or fully rolled back (ROLLBACK), preserving data consistency across multiple resources. - Concurrency Control: Utilizes locking mechanisms (e.g.,
ENQ/DEQin z/OS, row/page/table locks in DB2/IMS) to prevent simultaneous, conflicting updates from corrupting shared data, ensuring serialized access to resources. - Security and Authorization: Implemented through components like RACF (Resource Access Control Facility) to control access to data sets, programs, and system resources, preventing unauthorized modifications that could compromise integrity.
- Error Detection and Recovery: Includes features like logging, journaling, and checkpointing to detect errors and facilitate recovery to a consistent state after failures, minimizing data loss or corruption.
Use Cases
-
- Database Transactions: Ensuring that a financial transaction (e.g., debiting one account and crediting another in DB2 or IMS) either fully completes or fully aborts, maintaining the correct balance across accounts.
- File System Operations: Preventing multiple batch jobs from simultaneously writing to the same critical VSAM KSDS record without proper serialization, which could lead to data corruption or loss.
- Operating System Protection: z/OS's address space isolation and storage protection mechanisms prevent one application from inadvertently or maliciously overwriting the memory of another application or the operating system kernel.
- Referential Integrity Enforcement: In a DB2 database, ensuring that a foreign key value in one table always corresponds to an existing primary key value in another table, preventing orphaned records.
- Security Auditing: Tracking all attempts to access or modify sensitive data sets or system parameters using SMF (System Management Facilities) records to detect and prevent integrity breaches.
Related Concepts
Integrity is fundamental to the ACID properties (Atomicity, Consistency, Isolation, Durability) of transactions, particularly Consistency, which dictates that a transaction brings the database from one valid state to another. It is heavily reliant on Recovery and Restart mechanisms, such as those provided by RRS (Resource Recovery Services) and logging, to restore systems and data to a correct state after failures. Security components like RACF are crucial for enforcing integrity by controlling who can access and modify resources. Concurrency control (e.g., through ENQ/DEQ or database locking) directly supports integrity by preventing conflicting updates to shared data.
- Implement Transactional Logic: Design applications to use
COMMITandROLLBACKfor all critical updates, especially when dealing with multiple resources, to ensure atomicity and consistency. - Utilize Database Constraints: Leverage database features like
PRIMARY KEY,FOREIGN KEY,UNIQUE, andCHECKconstraints in