<img alt="" src="https://secure.cold5road.com/218968.png" style="display:none;"> Skip to main content
blog_banner
Blog

Learn all you need to know about mainframe to cloud migration: why you need it, the challenges you might face, and options for mainframe modernization.

img-54612334

Stop Writing Complex Integration. Call Any External API Instantly from Your Mainframe

Posted by Roi Mor, CTO and co-founder on March 3, 2026
Listen to audio version
7:57

REVAPI by OpenLegacy auto-generates a ready to use COBOL client from any Open API spec so your mainframe programs can call modern services without custom communication layers, manual JSON handling, or weeks of development.

The Missing Link in Phased Migration

Phased migration is the right approach for modernizing mainframe systems. Don't rip and replace. Don't freeze your core systems for a multi-year rewrite. Instead, extract components incrementally — migrating business operations piece by piece while keeping the mainframe running and stable.

But phased migration has a hidden dependency: the legacy system and the modernized components need to communicate. As you move business logic to modern services, the mainframe programs that currently own those operations need a way to delegate to them. Without that connection, you're not doing phased migration — you're doing parallel development, and eventually you face a hard cutover anyway.

This is the problem REVAPI solves. It creates a clean, reusable bridge: a COBOL client that any mainframe program can call to invoke an external REST API, as if it were a local subroutine. The mainframe doesn't know or care that the logic now lives in a microservice. It just calls the client, gets the response, and keeps running.

What is REVAPI and What Does it Do

REVAPI is a capability built into OL Code, OpenLegacy's browser-based IDE for legacy environments. It takes an Open API specification for any external service and automatically generates two production-ready assets:

  • Copybook — containing all connection properties for the external service
  • COBOL Client — a fully compilable program for the specific API method you selected (e.g., GET user by name, POST order, etc.)

Once compiled on your Mainframe or AS/400, the client is just another callable program. Any other COBOL program in your environment can invoke it — passing parameters, receiving the response — with no knowledge of the underlying REST protocol, JSON parsing, or authentication handshake. All of that is handled automatically by the generated client.

How It Works: A 3-Minute Walkthrough

The REVAPI video walkthrough shows the full process from start to deployable client. Here's the sequence:

  1. Obtain the Open API spec: Get the OpenAPI/Swagger spec for the external service you want to call. This is standard for any modern REST API.

  2. Generate in OL Code: Inside OL Code, select a dataset, choose "Generate API Client," paste in the spec and base URL for the external service.

  3. Select method and client type: Choose the specific operation you need (e.g., get user by name) and the COBOL client format such as CICS COBOL for z/OS or native for AS/400.

  4. Test via Hub endpoint: Before deploying to production, OpenLegacy provides a Hub endpoint to test the generated client against the live external service. Requires a Hub API key (generated from your user profile).

  5. Compile and deploy: Download the copybook and client. Compile on your Mainframe or AS/400. The client is now callable from any COBOL program in your environment.

What used to take weeks, scoping middleware, building a communication layer, handling token auth, parsing JSON responses into COBOL data structures, is now a guided workflow measured in minutes.

The Business Value: Migration Without Cutover Risk

The deeper value of REVAPI isn't speed, though speed matters. It's that it changes the risk profile of phased migration.

Traditional modernization forces a choice between two bad options: run legacy and modern systems completely in parallel (expensive, complex, eventually requires a hard cutover) or hold off on migrating a business operation until everything downstream is ready (slow, blocks progress, creates dependencies).

REVAPI enables a third option: migrate the business logic to a modern service, and have the mainframe call that service for the operation immediately. The mainframe stays authoritative. Business continuity is maintained. And the modernized component is live and validated in production from day one — not sitting in a staging environment waiting for a cutover gate.

For Finance and Banking

Core banking systems on Mainframes can begin delegating specific operations — fraud scoring, identity verification, rate lookups — to modern microservices via REVAPI-generated clients, while the main transaction system keeps running unchanged.

For Insurance and Government

Policy processing and claims systems can call external data enrichment APIs, third-party validation services, or newly modernized components without any changes to the calling COBOL programs.

For Retail and Supply Chain

AS/400-based order management systems can integrate with modern inventory services, shipping APIs, and e-commerce platforms — without replacing the AS/400 programs that have run reliably for decades.

Key Capabilities at a Glance

  • Supports CICS COBOL (z/OS Mainframe) and native AS/400 client generation
  • Works with any Open API / Swagger spec — cloud services, internal microservices, third-party APIs
  • Built-in test endpoint via OpenLegacy Hub before production deployment
  • Generated clients are fully reusable — compile once, call from any program in your environment
  • No middleware layer to build or maintain — all auth, JSON handling, and protocol complexity is encapsulated in the generated client
  • Part of OL Code — the free, browser-based legacy IDE that connects to Mainframe and AS/400 over TCP/IP

Frequently Asked Questions

Does REVAPI work with both z/OS Mainframe and AS/400?

Yes. REVAPI generates CICS COBOL clients for z/OS Mainframe environments and native clients for AS/400 (IBM i). You select the client format during the generation step inside OL Code.

Do I need to build or maintain middleware to use REVAPI?

No. REVAPI eliminates the need for a custom middleware layer. All authentication, JSON handling, and REST protocol complexity is automatically populated into OpenLegacy OL Hub and the generated COBOL client. The calling program interacts with the client as if it were any other local subroutine.

Is OL Code free? Are there any licensing requirements?

OL Code, the IDE that includes REVAPI, is completely free. Simply register for a free community account to get started. It runs as a JAR or Docker container and connects to your existing Mainframe or AS/400 environment over TCP/IP. An OpenLegacy OL Hub API key is also free and required for the pre-production test endpoint generated from your user profile.

Can a single REVAPI-generated client be used by multiple COBOL programs?

Yes. Each generated client is compiled once and becomes a callable program in your Mainframe or AS/400 environment. Any COBOL program in that environment can then invoke it, compile once, call from anywhere.

How long does it take to generate a COBOL client with REVAPI?

The generation workflow in OL Code, from pasting the OpenAPI spec to downloading a compiled-ready client, typically takes under ten minutes. The full process including testing via OL Hub endpoint and deploying to your environment is covered in the 3-minute walkthrough video.

Watch REVAPI by OpenLegacy in Action

The full walkthrough from Open API spec to compiled, testable COBOL client takes about three minutes. Watch the REVAPI video on YouTube →

To get started with OL Code (which includes REVAPI), visit community.openlegacy.com/ol-code. Simply register for a free community account to get started. Runs as a JAR or Docker container against your existing Mainframe or AS/400 environment.

 

Phased migration works when the old system and the new system can talk. REVAPI makes that a one-hour setup, not a six-month project.

We’d love to give you a demo.

Please leave us your details and we'll be in touch shortly