In Legacy Mainframe Modernization, COBOL is NOT the Problem

Raincode
4 min readJan 23, 2018

When people think of mainframe modernization, they generally think about migrating legacy applications written in COBOL to a flexible, server-based platform such as Windows, Unix, or Linux. While these applications do arguably make up some of the most important elements of a migration, it’s generally not the COBOL programs themselves that present the biggest challenge. COBOL is only one of several possible languages that must be handled during a migration.

DB2 SQL dialects

Most COBOL programs are designed to interact with a database system. In the vast majority of cases, that system is DB2, though some systems still use IBM’s older, hierarchical system: IMS. The problem of migrating data from DB2 to MS SQL was solved a long time ago, but what about SQL statements embedded in application programs? Though SQL is commonly believed to be a standardized language, the reality is that each vendor supports its own SQL dialect.

Much like this delicious-looking ice cream, SQL comes in many different flavors.

MS SQL doesn’t understand statements written for DB2, and migrating an application from one database to another can be a migration project in its own right. We’ve taken this difficulty into account and designed our compilers to transform DB2 SQL statements into equivalent SQL Server statements at compile time so that there is no runtime performance penalty involved.

The existing code can run on top of SQL Server without any changes whatsoever, even though its SQL statements were written for another database. Raincode goes the extra mile: as you don’t change your existing code, your legacy programs can be executed simultaneously in three different configurations to help you mitigate your migration risk:

  • Unchanged on your mainframe
  • In parallel execution on a .NET platform with a DB2 database on the mainframe
  • In parallel execution on a .NET platform with an MS SQL database

Moving programs is only part of a migration. If you can’t effectively deal with SQL statements, you have no real, comprehensive migration solution.

ASM370

Promising migration projects of millions of lines of code can be jeopardized by as few as 30,000 lines of ASM 370. Legacy programs routinely call assembly code which must be rewritten to migrate the system effectively. It is a non-trivial undertaking, and until recently, migration projects involving ASM 370 code were doomed from the outset.

To solve this issue, we address HLASM as a high level language with our ASM370 compiler for .NET. Macros, copy books, and reentry code are automatically migrated and executed on .NET.

Even a small amount of AM 370 code can mean “game over” for your migration project.

Our compiler supports the mainframe Assembler 370 and HLASM® syntax accurately, and emulates its data types and behavior. Modules compiled by the Raincode ASM370 compiler integrate seamlessly with the Raincode COBOL and PL/I compilers. With this technology, one of the biggest technical obstacles to legacy code migration is no longer an issue.

PL/I

In the 1970’s and 80s, IBM advertised PL/I as a versatile computer language suitable for both commercial and scientific applications, easy to use without prior programming experience, and that would eliminate the need for an assembler language. Many mainframe systems today still use applications written in PL/I. This can be a major hurdle for companies seeking to modernize their IT systems, as rewriting those applications can take years, and experience shows that automated translation of PL/I simply doesn’t work.

You might be old and grey by the time you finish rewriting all of your PL/I applications in another language.

At Raincode, we developed a PL/I compiler for .NET. that complements and integrates with our COBOL compiler. PL/I applications execute with a superior level of functionality on .NET — any new modules written in C# or VB.NET interact gracefully with the legacy code, calling or being called transparently by COBOL, PL/I or ASM370 programs.

Conclusion

Legacy Modernization brings absolute benefits: reduction in mainframe hardware and software licensing costs and rejuvenated and agile applications. It also prevents code obsolescence by allowing you to continue to develop your legacy code in a modern language of your choice.

Migrated code on .NET interacts gracefully with any supported modern language. Today, nobody should write new code in COBOL, PL/I or ASM370. New functionalities can be developed by integrating new C# or VB.NET code into the legacy system.

PL/I, COBOL and ASM370 resources will vanish in the next decade but, when your legacy applications are migrated with Raincode, a new generation of C# developers will be able to gradually take over development.

In a legacy code migration COBOL is not the problem — it is only part of a much larger puzzle where each piece must be placed carefully and by experts with the right technological tools for the job.

Originally published at https://www.raincode.com on January 23, 2018.

--

--

Raincode

We help companies with their digital transformation. Specifically, moving business-critical applications to modern distributed systems.