Mainframe assembler modernization using AI

One of the most intractable problems in legacy code modernization is that of mainframe systems written wholly or partially in IBM's HLASM assembly language. The challenge is not just to migrate the code so that it runs on a modern Linux server or cloud platform, but in doing so to produce natural, readable and, maintainable code which is a solid basis for the future. MicroAPL offers an innovative two-stage solution to this problem, combining our unique RelogixTM code analyser and translation tool with modern AI-assisted refactoring to quality Java or C# source code.

How not to solve the problem

Nearly all vendors offering tools and services for mainframe modernization concentrate on migrating COBOL or Adabas Natural code to run on modern systems, using automated or semi-automated tools to convert the code to run on modern servers or a cloud computing platform. This can work very well, but migrating assembly language source code is a different and much more difficult problem than migrating code from a high-level language. A solution offered by some vendors is to provide a C, Java or C# library which effectively emulates the hardware architecture of the original mainframe, typically allocating an array to hold the equivalents of the register contents of the original. Each mainframe instruction is faithfully reproduced in terms of how it acts on those registers and on the memory contents of the equivalent of the mainframe memory for a given module, expressed as an untyped array of bytes. This gives rise to code which looks something like this:

    public class FMT001 {
        ...
        private void SUB001() {
            regs.R7 = 10;
            if (MemImage.ReadByte(regs.R3) != 0) {
                MemImage.Copy (MemImage.Offset(BUFFER), regs.R4, regs.R3);        
            }
            SUB002();
            if (regs.R2 !=0) 
                return;
        }
        ...etc
    }

Unless the objective is simply to get the code running on a non-mainframe system, without any attempt to make the code readable, maintainable and extendable, such a translation is of no use; in fact, it is likely to be even less understandable than the original assembler.

Releasing the business logic locked up in legacy assembler applications

Abstract image of mainframe code transformation

MicroAPL's approach is different. We can unlock the intellectual property locked up inside mainframe assembler applications by leveraging our 30+ years of experience in analysis and migration of assembler programs in a two-stage process. First our RelogixTM technology is used to convert the assembler to high-quality C, with register contents and assembler data labels represented as properly typed variables. The generated translation will use proper arguments to functions, has natural C code flow, does endian-neutral data access, and uses natural C structures and unions. This C source code then provides a solid, testable foundation for conversion to Java or C# using AI-assisted refactoring and other commercially-available tools.

Conversion roadmap →