Why modernization is hard – Series 6

Convoluted code logic can be found in any system or programming language, but modern languages are designed to minimize such issues. For example, the creators of Java opted against direct memory allocation, pointer usage, and direct memory references. This design choice results in less confusing code, fewer bugs, and easier debugging and troubleshooting. Despite being designed with an easy-to-follow, English-like syntax, COBOL presents risks due to its numerous coding options, which can lead to programming errors. For example:  

  1. Logic control transfer statements:
    • GO TO statements (especially backward GO TOs to manage application looping) 
    • NEXT SENTENCE to skip logic 
    • PARAGRAPH fall through 
    • Combination of all the above 
  2. Direct Memory area access syntaxes such as:
    • Reference modifications 
    • Using ADDRESS OF syntax to manage set | get address pointers 
    • USAGE POINTER datatype 

In this blog, I will share experiences from customer modernization journeys where clients were ‘Proud of their Legacy Architecture’ and discuss how this pride impacts the quality of code during the transformation process.

  • One of our customers took great pride in their mainframe’s architecture and its historical superiority. While their original design was indeed strong, the modernization journey revealed numerous poor coding practices. The issue wasn’t with the initial architecture but with how maintenance practices deteriorated over time. By the time the system reached its 10th generation of programmers, the rigorous standards of the original team had been lost. The modernization team was shocked to discover outdated practices like backward GO TO logic, NEXT SENTENCE usage, and uncontrolled logic flow in the code.  

The following illustration depicts a small subsection of ‘GO TO’ based control flows in one of the customer COBOL programs  

    • For mainframe teams, using techniques like reference modification, accessing memory locations with pointers, and handling arrays with direct references is commonplace. While these practices are still valued by legacy subject matter experts (SMEs) for their ability to solve complex problems with minimal code, good architecture isn’t just about how many lines of code are needed to solve a problem. It’s also about how easily future generations of programmers can maintain, debug, and troubleshoot the system. Such practices can complicate understanding and hinder modernization and transformation efforts.  
    • We have seen COBOL programs intelligently access MVS Control blocks to extract all sorts of information from the operating system using memory pointers and combine that with business logic. 

        Conclusion 

        These late discoveries often disrupt ambitious modernization projects. However, CloudFrame Modernization toolkits, combined with AI, can identify and seamlessly transform programs with such complex coding patterns.  

        18 Jul 2022

        Predictions for the Future of zIIP and Specialty Processors

        Over the past few months, I’ve written about the current state of…

        25 Jun 2021

        CloudFrame Relocate Economics and Java on Z

        TL;DR CloudFrame's survey of large enterprises discovered the median installed mainframe MSU…

        15 May 2023

        Five Great Use Cases to Gain the Benefit of zIIPs

        The IBM zIIP is a dedicated specialty processor designed to operate asynchronously…

        Written by

        Venkat Pillay

        Venkat is a true technology visionary, serial entrepreneur, strategist, deep generalist, and architect. With over 25 years of experience and a passion for innovation, his expertise ranges from Legacy to emerging technology and company building.

        Founder and CEO