Sponsored content from Micro Focus
The COBOL Working Group of the Open Mainframe Project wanted to show that COBOL applications could realistically be modernized, so the group asked a student to demonstrate a variety of techniques on an example banking application. Sudhanshu Dubey accepted this mission and has done a tremendous job, as documented in his COBOL Modernization Github repository. In the interview that follows, I asked him about his experience.
Misty Decker (Misty): When you were first asked to do this project, what did you think about COBOL?
Sudhanshu Dubey (Sudhanshu): I find it rather funny that COBOL is so omnipresent that everyone has just forgotten about it. COBOL and mainframe are to the digital economy what blood is to the body, the essential core. But, blood is constantly refreshed while COBOL applications aren’t. Now this is where modernization joins the chat.
Misty: What did you learn about COBOL modernization?
Sudhanshu: COBOL applications, like all other applications, need updates. They need to be maintained and improved to be more “modern”, but there are several reasons why this hasn’t been happening enough:
- They already work so well that the need to improve them wasn’t felt for a long time.
- They were designed and made as large monolithic applications, which prevents people from attempting to improve them.
“Modernization” means different things for different people and organizations. For some, modernization means just replacing the application with a newer one they get from the market. For others, it means rebuilding the same application with a more “modern” programming language. And, for us, it means changing the monolithic architecture of the application to a microservice-based one. This change in architecture preserves the existing business logic and allows “modern” tools and techniques, like DevOps, cloud, and APIs, to be integrated with the application.
The 4-step Approach
Misty: Tell us a bit more about your project.
Sudhanshu: The project was part of the Open Mainframe Project’s mentorship program and I [worked on] it while [I was] a graduate student. I was given a demo monolithic banking application to modernize with the help of my mentors. Within three months, I learned the current architecture of the application and refactored it to allow new user interfaces and integration into cloud services. I followed four steps:
- Analyze the COBOL Application
- Identify services candidates
- Isolate and expose them as services
- Connect them to a new, modern UI
Misty: How did you go about analyzing the application?
Sudhanshu: Before changing anything, you need understand what you’re starting with. The difficulty of analyzing an application depends on many factors, like the programming language, the framework used, and the amount of documentation available. In our case, we used Enterprise Analyzer to gain a high-level understanding of the monolith. It produced many diagrams for us, like data flow diagram, screen flow diagram, CICS flow diagram, and job executive report. With these, we were able to see what was going inside the application and which programs were involved in executing a particular functionality. You can read my OMP blog on this step to find out how exactly I did it.
Misty: Now that you have a map of the application, how did you identify the services candidates?
Sudhanshu: If your application allows it, you can pick one feature to isolate and the diagrams from the last step will tell you what needs to be extracted to perform that feature. Your goal for this step should be to come up with a target architecture. The target architecture should be made of multiple microservices, their UIs and the APIs connecting them. Supporting all of them should be the remaining part of the legacy application. To understand how you can involve your whole team during this step — and you should involve everyone — read this OMP blog.
Misty: You know what you want to do, how do you implement it?
Sudhanshu: You need to implement the plan you made earlier. But, remember that our application is a giant monolith so this will feel like playing Jenga. You should follow these steps:
- Carefully slice the code that you want to isolate.
- Package it together and deploy it as microservice wherever you want (but it should be accessible to the legacy application).
- Update the monolith to call the new service via new APIs.
- Test it all.
Perform these steps for all the service candidates until you achieve your target architecture. With these new microservices, you will have greater flexibility in how you want use them.
Misty: Now that you have these microservices, what do you do next?
Sudhanshu: This is probably the most fun part of the project. Microservices enable us to communicate using standard techniques like JSON and XML, and that makes the possibilities almost endless. In this step, you create the modern UI that your customers want and need.
For our project, we demonstrated three different UIs using three different technologies. All of them were working with a COBOL backend using VSAM datasets as storage. We created an Android application using Java, a webapp using PHP, HTML, and CSS, and another webapp using Python and Flask. While Java and PHP were using JSON as the medium to communicate with COBOL, Python took it a step ahead and talked directly with COBOL via the ctypes library. This is the power of a good modernization technique.
Misty: So, what have you learned from this project:
Sudhanshu: COBOL “flow-like” modernization is simple to understand and possible to execute. Unlike the other approaches, there is minimal disruption, least risk, and maximum profit. You don’t need to throw away or replace your core business applications. You just need to improve them. No special skills or experiences are required — you just need the willingness to reimagine COBOL applications. The benefits are huge: You gain a thorough understanding of your application, which can interface with new programming standards, new techniques, and new technologies, and you get happy customers. All of it with minimal cost and risk. So, start your modernization journey today and unlock the value hidden in your COBOL applications.
You don’t need to throw away or replace your core business applications. You just need to improve them.
Conclusion
The COBOL Working Group was very impressed with how much Sudhanshu was able to accomplish over the course of three months when presented with a challenge that few professionals have completed. It’s important to note how Sudhanshu focused on the value of the application and worked from there. The results prove that it’s possible to connect existing COBOL applications to modern UIs and services. To learn more about Sudhanshu’s project and see a full demo, check out this webcast.
Through 30 years, two companies and eight career changes, two things have remained constant in Misty Decker’s career: mainframes and a passion for helping people. Misty spent most of her career at IBM leading in roles such as system administrator, project management, customer satisfaction, HW development manager, and academic outreach. She is currently a Product Marketing Director at Micro Focus helping companies learn how to modernize their existing mainframe applications with concepts such as DevOps, microservices and cloud.