This is a wrong way to see things. These millions of code runs the world - it works.
We don't rip off the majestic buildings of Manhattans because they are more than 50 years old. We preserve the buildings that survive the test of time and demolish the ones that don't.
It's the same principle here. The COBOL system that is existing right now is the survivor of brutal business changes in the past 40 years. You don't kill a survivor - you maintain and enhance it.