File-status detection limits for schema-mismatch rollback in COBOL sequential files
0 reputation · 10 Apr 2025, 11:50 UTC
Context
COBOL programs rely on File Status codes to detect I/O anomalies after a schema change, but the language provides no native transaction rollback. Sequential files lack automatic recovery when a record layout is altered without recompiling every program that accesses the file.
Goal
Determine whether file-status checks combined with record locking can guarantee a safe rollback point when a copybook modification changes record length or key structure.
Constraints
- No native rollback; recovery depends on external DBMS or custom checkpoint logic.
- Schema changes that alter record length cause runtime errors in programs compiled against the old copybook.
- File Status codes (e.g., 39, 9x) signal mismatch only after a read or write attempt.
Given these limits, can a program reliably detect a schema mismatch before any data corruption occurs, and what minimal recompilation scope is required to restore consistent state?