Modernizing a mainframe involves applying some combination of modification, encapsulation and substitution to the applications and datasets. The objective is to future-proof them for ongoing business use while retaining the functionality the organization already depends on.
Successful modernization programs rarely begin with a fixed decision on the end state. Instead, the better route is to inventory the full application estate and then allocate each workload to a suitable modernization technique. Based on completing more than 250 mainframe-related engagements across highly available systems, this is generally the order of events that produces the best outcomes.
The remainder of this article is aimed at CIOs, Directors of Data Centres, Building Controllers and senior business stakeholders responsible for highly available functions. You will learn about the methods available, guidance on when to refactor versus rewrite, key mitigations that allow continued operation, and where PODTECH fits into the process.
Modernize Legacy Systems With Care
PODTECH provides bespoke IT solutions to high-availability industries. Our services include modernizing legacy IT and integrating further critical functions.
VisitTL;DR
- There is likely to be a mix of techniques applied to the overall estate. From Retain through Rehost, Replatform, Refactor, Rearchitect, Replace and Retire, each will apply to particular workloads.
- Techniques such as introducing an API layer or using the Strangler Fig pattern permit ongoing operation of the incumbent system as individual functions are transitioned.
- If a reasonable level of code quality and manageable complexity exists, it will usually be possible to refactor. Conversely, if the effort required exceeds that of a rewrite, or the desired outcome cannot otherwise be achieved, then a rewrite will be appropriate.
- Functionally equivalent operation between the legacy and new implementations must be demonstrated using representative datasets in a near-live setting.
- Undertake a detailed analysis of the mainframe estate to identify the extent and implications of dependencies, data and operational constraints before committing to a given solution.
Table of Contents
- What mainframe modernisation actually entails
- The 7 Rs: allocating a method to each application
- Begin with an analysis, don't pre-commit to an end-state
- Refactor vs Rewrite
- Methods to continue operating the incumbent system
- Managing dependencies, datasets, QA and Cyber
- How to complement or supersede the Mainframe
- Further elements of the modernisation programme
- Recommended flow
- Role of PODTECH
- Our thoughts
- FAQ
- References
What mainframe modernisation actually entails
A mainframe is a monolithic computing system. It will typically execute a mixture of batch and online transactions, predominantly coded in COBOL, PL1 or Assembler. Associated databases will often be DB2, IMS or similar, with datasets stored as VSAM. A number of key business functions will depend upon this environment continuing to operate.
As set out above, modernization broadly refers to any action taken to modify, augment or displace the mainframe and its supporting elements. The actions may range from migrating applications to an alternate base through to eliminating certain assets entirely. Depending on industry, drivers for this activity may include:
- Connecting to additional systems such as new business apps, data platforms and machine learning workflows that require access to relevant data and information.
- Ensuring sustainability of the current workforce and knowledge as specialist skills become harder to source and retain.
- Enabling a faster pace of change so the platform can keep up with adjacent product lines and business priorities.
- Improving observability of the wider estate, including the Data Centre, Building Management and related operational systems.
In many cases, there is no need to undertake a wholesale replacement of the mainframe. By considering the appropriate course of action for each element, these objectives can often be addressed without a single high-risk cutover.
The 7 Rs: allocating a method to each application
The 7 Rs of mainframe modernization are a well-known concept, evolving from earlier migration taxonomies and subsequently adopted by the major cloud providers. They are best treated as a decision framework rather than a single prescribed path.
| Method | Description | When it would be considered |
|---|---|---|
| Retain | Leave on the mainframe and undertake other actions to modernize around it. | Long-standing, key business capability that still performs well. |
| Rehost | Migrate in-kind to an alternative system. | When looking to decommission the mainframe with minimal functional change. |
| Replatform | Migrate to an alternative system with little or no modification. | Change of underlying DBMS, OS or runtime environment. |
| Refactor | Make internal improvements to the application codebase. | Good quality code and valuable existing functionality. |
| Rearchitect | Convert to a distributed architecture. | Desire for greater elasticity and decoupling of processes. |
| Replace | Introduce an off-the-shelf or newly built system. | Generic requirement that is non-core to the organization. |
| Retire | Decommission the asset. | No longer required by the business. |
Of course, each organization will have some, or indeed all, of the above applicable. However, two considerations stand out.
- It will almost certainly involve a combination of methods, not a single strategy applied uniformly across the estate.
- Retire is often underused. When reviewing the application portfolio, there will invariably be candidates for consolidation, duplication and superseding. These should be identified and removed from the scope of any modernization exercise.
Begin with an analysis, don't pre-commit to an end-state
Jumping straight into selecting the technology that will host your applications is likely to prove one of the costliest decisions in the program. An initial deep-dive into the mainframe provides the basis on which to build a credible plan.
At a minimum, you will want to establish:
- The full scope of the application suite, including programs, procedures, TUIs, communications links and associated data.
- The interdependencies between these elements, for example upstream sources, dependent downstream systems, triggered routines and dataset movement.
- How material the application is. Critical revenue, legal and life-safety systems require a higher level of assurance than downstream reporting or convenience tooling.
- How robust the existing implementation is, including code quality, level of automation, available artefacts and staff familiarity.
- What the potential loss is, including downtime, fines, operational harm and reputational impact.
The result of this exercise should allow you to propose a program of work, including priority order, that minimizes the blast radius of any individual activity.
An example of an output from our Legacy System Assessment is available here: what a legacy system assessment actually delivers. Similarly, if your environment contains a significant volume of mainframe databases, the following article sets out some of our approaches to moving these: database migration blueprints.
Refactor vs Rewrite
If you have searched for anything about improving a mainframe estate, this is likely the first question you encountered. Refactoring allows you to change the properties of an existing body of code without affecting its behavior. Rewriting involves implementing equivalent functionality in a fresh codebase.
Reasons to consider a refactor
- There is useful, working functionality that simply needs decoupling, redundancy removal and improved clarity.
- You have a sufficient level of test coverage, or trusted live data, to ensure continuity of behavior after the refactor.
- The current system will continue to meet the business' requirements going forward.
- You want to externalize knowledge from incumbent staff by forcing the team to document and digest the functionality properly.
Reasons to consider a rewrite
- The degree of complexity such as extensive ALTER table usage, implicit IF logic or code mutation means the time to refactor is comparable to developing from scratch.
- The business requires functionality not supported by the current infrastructure, such as very large event volumes or machine learning on GPU-backed platforms.
- Multiple disparate aspects of the solution need to be isolated and scaled separately, typically frontend, calculation and persistence.
Caveat re. estimating
There is no magic bullet for producing a more sustainable codebase. In an academic paper analyzing an approximately 4.6 million line COBOL system, the true extent of the task turned out to be 27.5% greater than initially planned and team velocity dropped 21–30% following the activity.
The key takeaway is not that you should avoid refactoring, but that you should establish a robust view of the scope of work and define concrete metrics of success to measure progress against. That is why we recommend undertaking a formal Legacy System Assessment first.
As a heuristic, if two experienced developers cannot articulate the functionality in question within 24 hours, determine, with appropriate justification, whether to proceed with a refactor or rewrite before locking in the engagement.
Methods to continue operating the incumbent system
Attempting to switch over the entirety of a mainframe workload in a single period introduces significant uncertainty. Two techniques are especially useful for spreading transition risk and preserving continuity.
Adding an API layer
By exposing relevant mainframe functionality via an API, you enable additional consumers such as web applications, mobile apps and data science platforms to build upon the system while the original software continues to run. This is commonly the quickest route to unlock further use cases from mainframe assets.
Key safeguards include:
- Rigorous testing of the API surface at both unit and integration level.
- Stress testing to reflect the increased number of consumers against the mainframe.
- Maintaining the ability to bypass the API where necessary.
- Verifying that no information is lost or corrupted when translating from the native format to the API format.
See our blog post on delivering this without introducing any period of downtime.
Strangler Fig approach
Following the Strangler Fig technique, an additional layer is introduced in front of the existing mainframe to proxy traffic to the incumbent or newly built services. As each discrete area of responsibility is transferred, the corresponding legacy code can be retired.
This provides multiple benefits, including earlier realization of benefits, reduced blast radius of issues and avoidance of a single discrete switch-over point. Further detail on this process and considerations around the traffic-routing mechanism is available in our article on achieving a zero-downtime Strangler Fig migration.
Managing dependencies, datasets, QA and Cyber
There are four areas where you need to be particularly vigilant.
- Third-party and internal dependencies: these can range from obscure data files to downstream reports consumed elsewhere. Identify and track the full dependency chain throughout the program.
- Data formats: the mainframe may store and manipulate data in ways unfamiliar to alternative technologies. Ensure that both volume and key values can be reconciled once the transfer is complete.
- Test strategy: the aim is to demonstrate equivalence of the new and incumbent implementations. Develop a comprehensive suite of scenarios covering the transferred functionality and execute them against both environments. Where a full rewrite has been implemented, work with relevant SMEs to confirm adherence to key business processes and conduct a further battery of tests using live data.
- Cybersecurity: assess the current state of the system and implement any remediation as part of the broader modernization activity.
Security. By adding a wrapper and rehosting, you increase the number of actors able to interact with the environment. All APIs created as part of this exercise need full security, authentication and traceability from day one. Similarly, check permissions of any legacy data before migrating it.
How to complement or supersede the Mainframe
There are some workloads for which staying on the mainframe makes sense. If a process involves very high volumes of transactions and has evolved over many years, it may be prudent to leave it where it is. Banks, for example, have long been reluctant to abandon COBOL-based systems; according to estimates published by Luxoft, a significant proportion of the US mainframe landscape remains COBOL-dependent.
You can therefore retain certain processes and focus the rest of the modernization effort on developing complementary capabilities such as APIs, streams, user interfaces and advanced reporting.
In general, you will see some combination of rehosted and refactored applications on off-the-shelf hardware, purpose-built rearchitectures and commercial off-the-shelf solutions filling gaps. As above, the optimum solution depends on the individual application, which is why considering the overall system landscape matters so much.
Further elements of the modernisation programme
Readers will also have questions around other aspects of the wider IT estate:
- Databases: it is important to plan for a phased transfer using appropriate replication and verification techniques. See our database migration articles for detail (part 1, part 2).
- User interfaces: many applications will have associated green-screen or similar interfaces, and these can often be removed relatively quickly. We have an article describing modernizing Oracle Forms in particular.
- Data center and building management: data centers typically have BMS and PMS platforms deployed which may have no connectivity to other elements of the infrastructure. These require separate consideration, addressed in our BMS and PMS services.
- Construction: there will almost certainly be manual transfer of information between site operatives and corporate systems. Again, you will want to establish connectivity and identify opportunities for removal. Our piece on bringing digital capability to the construction sector illustrates this.
Recommended flow
There is no single right approach. However, a logical progression would be:
- Identify all relevant applications and assign a score based on materiality to the business, criticality and current state.
- Remove any surplus systems.
- Enable retained applications to feed downstream systems via APIs.
- Progressively migrate the remaining applications using a Strangler Fig method.
- Test to equivalence at each stage.
- Take over operation and implement appropriate SLAs and support structure.
Ensure each phase can be undone if necessary. If the program can be reversed on a per-function basis, there is a greater likelihood that the organization will continue to invest in it.
Role of PODTECH
At PODTECH, we develop bespoke software solutions for key business-critical functions. Modernizing legacy estates forms a key pillar of this activity. Our offering spans identifying suitable targets, wrapping existing systems, progressive cutover and integration of BMS, PMS and NMS systems.
For an example, please see our System Integration case study. We can supply a fully embedded team or augment your existing resource, and guarantee 99.9% availability with worldwide coverage.
Alternatively, you may wish to receive a preliminary opinion of your IT landscape. Our Legacy Modernisation page provides some guidance, or get in touch via podtech.com.
Our thoughts
From our experience, the majority of unsuccessful modernization programs stem from a failure to follow an ordered sequence. Clients tend to settle on a target technology, such as a cloud platform or coding language, and only later discover the extent of ancillary systems and complexities, by which point remedial action becomes difficult.
It is our view that the most effective methodology is to identify the applications in the legacy estate, preserve those that still meet the client's needs, enable connectivity to the wider ecosystem and progressively transition the balance to the new estate while maintaining the ability to roll back each element.
In many contexts, including data center, finance and smart building environments, loss of service is the primary concern. That requires a higher degree of assurance for each transition.
Consequently, we focus heavily on achieving parity for each functionality and facilitating integration of supporting BMS, PMS and NMS platforms. Having successfully completed more than 250 engagements, our team is well placed to support clients with transitioning their estates to future-proof, easily updated platforms capable of harnessing emerging technologies.
Harry
FAQ
What are the 7 Rs of mainframe modernization?
These are: Retain, Rehost, Replatform, Refactor, Rearchitect, Replace and Retire. Each represents a possible course of action for a given legacy function, and the vast majority of organizations will adopt a mix.
Do we need to refactor / rewrite?
If you have good working code, refactor. You will preserve existing functionality while enabling easier future development. If the cost of a refactor becomes close to that of rewriting the code, or if there are new requirements that the existing solution does not meet, then consider a complete rewrite. This should be done on a module-by-module basis with an informed estimate.
What is the timescale to modernise mainframe assets?
This varies based on asset footprint, quality and the approach taken. For example, wrapping key functions via an API may be achievable within a limited program duration, whereas an incremental program of work could span several years. An initial analysis allows you to build an appropriate phased program.
Is it possible to continue operating without disruption?
Yes. By following an incremental program of work, an API-based wrapper allows continued use of the original system. Alternatively, applying the Strangler Fig technique sees individual processes migrated and served via a proxy. Both legacy and rewritten code paths should be exercised to ensure equivalence before decommissioning the former.
