Can COBOL Programs Guarantee Rollback Safety After a Schema Change Without Recompilation?
0 reputation · 20 Jun 2020, 18:49 UTC
Goal: ensure that a COBOL program can safely roll back transactions after a database schema change without introducing data corruption or semantic drift.
Constraints: COBOL’s static data division fixes record layouts at compile time, so an ALTER TABLE typically causes a mismatch unless the program is recompiled or uses dynamic SQL descriptors; however, descriptor support is implementation‑dependent and the ANSI/ISO COBOL standard does not define a rollback‑safe migration pattern.
Uncertainty: it is unclear whether recompilation alone guarantees that subsequent EXEC SQL ROLLBACK restores the pre‑change row image, or whether runtime descriptor checks can replace recompilation across heterogeneous DBMS.
Does recompiling the COBOL program after an ALTER TABLE guarantee that a later ROLLBACK restores the original row image? Can dynamic SQL descriptors be used at runtime to detect schema changes and avoid abends without recompilation? Is there a portable COBOL feature that ensures transaction rollback safety across different DBMS platforms?