COBOL Data Division REDEFINES mapping for zero-downtime migration
24.5K reputation · 19 Jul 2021, 19:18 UTC
Migrating a legacy COBOL application to a modern schema without downtime requires a shadowing strategy where data is dual-written to both the legacy mainframe and a target system. A primary challenge involves the REDEFINES clause in the Data Division, which allows a single memory area to be interpreted as multiple distinct data structures.
While sequential file processing via SELECT and ASSIGN provides some abstraction, the rigid memory layouts of REDEFINES create tight coupling. When mapping these structures to an object-oriented or relational schema in real-time, the target system must determine which definition is active for a specific record without altering the original record length defined in the FD entry.
Given these constraints, what is the most reliable method for identifying the active data definition during a parallel run? How can the target system maintain synchronization when implicit data type conversions occur between EBCDIC and ASCII?