COBOL to COBOL refactoring changes the compiler, dialect or supporting runtime while retaining COBOL as the application language. Amdocs uses CodeTurn for supported rule-based transformations. This path can help an organization move away from an aging platform while keeping the language its team knows.
Key Takeaways
- Retaining COBOL can separate a platform move from a language change.
- Compiler options, numeric semantics and file behavior can change even when the language stays the same.
- Pick the target runtime and acceptance tests before deciding how much code to change.
When retaining COBOL makes sense
A supported compiler may be the priority when the current compiler is approaching end of support, licensing is under review or a team needs to move to distributed infrastructure. Keeping COBOL can reduce how much the development team has to learn during the migration. It still requires a plan for staffing, integration and maintenance after release.
Start by distinguishing rehosting and refactoring. A rehost moves execution with limited source changes and uses a compatible runtime where needed. COBOL-to-COBOL refactoring changes source constructs for the target compiler or runtime and may change access to data or middleware. The same estate can use different paths for different applications.
Identify dialect and platform differences
Inventory copybooks, compiler directives, extensions, embedded calls and data formats. Look for numeric options, field padding, collating sequences and behavior on errors. Check whether transaction processing, batch scripts, file handling and utilities have compatible counterparts in the target. Record unsupported constructs before estimating a wave.
Use a pilot to prove more than compilation
Choose a representative workload and convert it with the target compiler settings. Compile the complete dependency set, run known inputs on both environments and compare outcomes. Test boundary arithmetic, record layouts, keyed file access, return codes, restart behavior and batch elapsed time. Keep the list of approved deviations under change control.
Define what the target team can operate and support. Identify compiler and runtime licenses, observability gaps, and any components that must remain on the mainframe for a period. If changing to Java or C# is a later objective, document the business rules, interfaces and test baselines now so the next migration wave can reuse them.
Explore our holistic mainframe modernization solution
Unlock agility, innovation and all the cloud benefits while eliminating mainframe-related risks with an end-to-end, AI-driven transformation solution.
Related Insights
Frequently Asked Questions
Can COBOL stay in use after a mainframe exit?
Yes. When the application, compiler and dependencies are compatible with the target platform, COBOL can remain the programming language. A mainframe exit still depends on migrating or replacing the data, transaction processing, batch scheduling and external interfaces the application needs.
Will the new compiler behave like the old one?
That is an acceptance criterion to test. Compiler options and dialect features can affect arithmetic, record handling or control flow. Use the original application’s behavior as a baseline and agree with the business how any differences will be handled.
Does it make sense to keep COBOL in the long run?
Only if your company can sustain the skills needed to maintain and evolve its COBOL applications. The key question is whether enough people understand both the code and the business rules behind it to make changes, resolve incidents, and train successors. If that knowledge rests with a few specialists and replacements are hard to find, start transferring it now. Pair experienced COBOL developers with the engineers who will take ownership, document critical rules, and build regression tests. That gives the company time to develop its team and, where skills gaps persist, transition selected workloads to a language it can support long term.
Transform Smarter. Deploy Faster.
Ask us how.
Transform Smarter. Deploy Faster.
Ask us how.