Insights & Blog

COBOL/CICS Mainframe Modernization: Integrating Legacy Systems with Modern APIs

CICS and COBOL are still current IBM platforms. Expose them as secure APIs first, then modernize behind those APIs one capability at a time.

By Hetal KSoftware Architecture, .NET & APIs

A z/OS CICS TS 6.3 region with transactions, COBOL programs, copybooks, Db2 and VSAM data and RACF security, showing a 3270 account enquiry screen and a COBOL copybook with EXEC CICS GET CONTAINER, flowing through copybook to OpenAPI, z/OS Connect and CDC plus events into REST APIs, an API gateway with OAuth, web, mobile and cloud apps and a cloud data platform, with a JSON balance response

COBOL and CICS API integration exposes mainframe transactions as secure REST APIs, and lets COBOL programs call modern services, so web, mobile and cloud applications can use the mainframe without rewriting it. For most organizations with IBM Z, the mainframe is not end of life: IBM shipped CICS Transaction Server 6.3 in September 2025 and Enterprise COBOL 6.5 in June 2025. The pressure is integration, skills and change speed. This guide covers the integration patterns, the tools IBM provides, a target architecture and a phased plan from “wrap” to “refactor”.

Technically reviewed by Harshita Pipaliya.

This is the twenty-second article in our Legacy Modernization Series. It follows Lotus Notes/Domino to Power Platform or Modern Web Applications. For service design on the consuming side, see our WCF to ASP.NET Core Web API and gRPC guide.

Executive summary

  • The platform is current: IBM made CICS Transaction Server 6.3 generally available on 5 September 2025 (IBM), and Enterprise COBOL 6.5 on 13 June 2025.
  • APIs are built in: IBM z/OS Connect exposes CICS, IMS, IBM MQ and Db2 assets as REST APIs described with OpenAPI 2.0 or 3.0, and lets COBOL and PL/I programs call external REST APIs (IBM docs). CICS also has its own JSON web services support.
  • Integrate first: wrapping stable COBOL transactions as APIs delivers new channels quickly, at low risk, and creates the seams needed for later refactoring.
  • Data needs its own path: analytics and AI workloads should read replicated data, not call transactional APIs in loops.
  • Our recommendation: inventory transactions and data, expose the most valuable ones through z/OS Connect behind an API gateway, add event and data replication paths, and then refactor or move selected capabilities off the mainframe only where the business case is clear.

Platform status: CICS and Enterprise COBOL

ItemStatusDate
CICS Transaction Server 6.3Generally available5 September 2025
CICS Transaction Server 6.2Generally available14 June 2024
CICS Transaction Server 6.1Generally available17 June 2022
CICS 6.3 lifecycle policyEnhanced: minimum 5 years support, with 3-year extension–
Enterprise COBOL for z/OS 6.5Generally available13 June 2025
IBM z/OS Connect (zosConnect-3.0)OpenAPI 2.0 and 3.0, provider and requester–

Sources: IBM CICS product pages and announcements list, IBM Enterprise COBOL 6.5 announcement blog, IBM z/OS Connect documentation. Check IBM’s end-of-service pages for the versions you run.

What this means: running CICS and COBOL is not a support emergency if you stay on current releases. Older CICS and compiler versions do go out of service, so keep upgrades in the plan.

Why integrate before you migrate

  • Risk: large rewrites of core COBOL systems are long and risky; APIs deliver value without changing proven logic.
  • New channels: web, mobile, partners and cloud services need APIs, not 3270 screens or batch files.
  • Skills: API consumers work in Java, .NET or JavaScript, without learning COBOL or CICS.
  • Seams for change: an API boundary lets you later replace what sits behind it, one capability at a time.
  • Cost control: caching, read replicas and event streams can keep heavy read traffic off the mainframe.

Integration patterns compared

PatternUse forToolsWatch-outs
API provider (REST over CICS programs)Real-time queries and transactions from new appsz/OS Connect, CICS JSON web servicesMap COMMAREA/containers carefully; design coarse-grained APIs
API requester (COBOL calls out)Mainframe programs using cloud or partner servicesz/OS Connect API requester, CICS WEB APILatency and timeouts inside transactions
MessagingAsynchronous, reliable integrationIBM MQ, event streaming platformsMessage design and ordering
Change data captureAnalytics, AI, read-heavy servicesReplication tools from Db2 or VSAM to cloud data platformsData latency; mapping EBCDIC and packed decimals
Batch file exchangeExisting nightly interfacesManaged file transferSlow; keep only where it fits
Screen scraping (3270)Last resort when no program interface existsTerminal emulation toolsFragile; replace with APIs

Mainframe to API concept mapping

MainframeAPI worldNotes
CICS transaction / programREST operationPrefer one business action per operation
COMMAREA or channel/containersJSON request and responseGenerated mappings from copybooks
COBOL copybookOpenAPI schemaField names, types and lengths need review
PIC S9(7)V99 COMP-3number with two decimals, or stringAgree precision rules with consumers
EBCDIC textUTF-8 JSON stringsConversion handled by the integration layer
RACF user IDsOAuth tokens mapped to RACF identitiesKeep end-user identity through to CICS
Return codes, ABENDsHTTP status codes and error bodiesMap consistently
Batch jobs (JCL)Scheduled jobs, events, or APIsNot every batch job needs an API

Code patterns: before and after

The examples below are illustrative and simplified.

1. The existing COBOL copybook (before): the interface of a CICS balance enquiry program.

       01  ACCT-ENQ-AREA.
           05  AE-ACCOUNT-NO        PIC X(10).
           05  AE-RETURN-CODE       PIC 9(2).
           05  AE-CUSTOMER-NAME     PIC X(40).
           05  AE-BALANCE           PIC S9(11)V99 COMP-3.
           05  AE-LAST-TXN-DATE     PIC X(10).

2. The CICS program reading a channel container (unchanged logic, API-ready interface):

           EXEC CICS GET CONTAINER('ACCT-REQ')
                CHANNEL('ACCT-CHANNEL')
                INTO(ACCT-ENQ-AREA)
                RESP(WS-RESP)
           END-EXEC
           PERFORM 2000-READ-ACCOUNT
           EXEC CICS PUT CONTAINER('ACCT-RESP')
                CHANNEL('ACCT-CHANNEL')
                FROM(ACCT-ENQ-AREA)
           END-EXEC

3. The OpenAPI 3.0 contract exposed through z/OS Connect (after):

openapi: 3.0.3
info: { title: Account Enquiry API, version: 1.0.0 }
paths:
  /accounts/{accountNo}/balance:
    get:
      operationId: getBalance
      parameters:
        - { name: accountNo, in: path, required: true, schema: { type: string, maxLength: 10 } }
      responses:
        "200":
          description: Balance found
          content:
            application/json:
              schema:
                type: object
                properties:
                  customerName: { type: string }
                  balance: { type: number, format: decimal }
                  lastTransactionDate: { type: string, format: date }
        "404": { description: Account not found }

4. A .NET service consuming the API through a gateway:

public record Balance(string CustomerName, decimal Balance, DateOnly LastTransactionDate);

public class AccountClient(HttpClient http)
{
    public Task<Balance?> GetBalanceAsync(string accountNo, CancellationToken ct) =>
        http.GetFromJsonAsync<Balance>($"accounts/{Uri.EscapeDataString(accountNo)}/balance", ct);
}
COBOL and CICS API integration target architecture: IBM Z running CICS Transaction Server with COBOL programs, COMMAREAs and channels, Db2 and VSAM data, batch JCL, RACF security and IBM MQ is exposed through IBM z/OS Connect as OpenAPI REST APIs behind an API gateway with OAuth and rate limiting, consumed by web, mobile, partner and cloud applications on .NET or Java; COBOL programs call cloud services through the API requester; change data capture and MQ events feed a cloud data platform for analytics and AI; with central identity, monitoring, CI/CD for COBOL and API contract tests
  1. System of record: CICS, COBOL, Db2 and VSAM on IBM Z, kept on supported releases.
  2. API layer: z/OS Connect exposing coarse-grained, versioned OpenAPI contracts; API requester for outbound calls.
  3. Gateway: an API gateway (for example Azure API Management or a similar product) for OAuth, throttling, caching and developer onboarding.
  4. Events and data: IBM MQ and change data capture into a cloud data platform for analytics, search and AI (see our guide to AI integration with legacy systems).
  5. Engineering: source control and CI/CD for COBOL and API definitions, automated contract and regression tests, end-to-end monitoring.

Need mainframe data and transactions in new applications? Talk to our modernization team about an API-first plan for your CICS estate.

Modernization options beyond APIs

OptionWhat it meansWhen it fits
Integrate (wrap)APIs and events around existing COBOLStable logic, new channels needed
Refactor on platformImprove COBOL code, add tests, split programsPlatform stays; code quality is the problem
Strangle by capabilityRebuild selected capabilities as cloud services behind the same APIClear business case per capability
Rehost or replatformRun COBOL on emulation or cloud platformsHardware or licence exit is the main driver
Rewrite or replaceNew system or packageMajor business change; highest risk

APIs are the common first step for every option, because they decouple consumers from where the logic runs.

COBOL and CICS API integration steps

  1. Inventory: list CICS transactions, programs, copybooks, data stores, batch jobs and current interfaces.
  2. Prioritize transactions by business value and demand from new channels.
  3. Prepare interfaces: move programs to channels and containers where needed; clean copybooks.
  4. Design APIs around business actions, with versioning and error models agreed with consumers.
  5. Expose them through z/OS Connect and publish through the API gateway.
  6. Add data and event paths with change data capture and MQ for read-heavy and asynchronous use.
  7. Automate: put COBOL and API definitions in source control with CI/CD and tests.
  8. Refactor or move selected capabilities behind the stable APIs, one at a time.

Security considerations

  • Identity propagation: map OAuth or JWT identities to RACF so CICS authorizes the real user, not a shared ID.
  • Gateway protection: enforce TLS, OAuth scopes, rate limits and payload validation before traffic reaches the mainframe.
  • Least privilege: expose only the operations consumers need; never expose generic “run any transaction” endpoints.
  • Data protection: mask or tokenize sensitive fields in replicated data.
  • Audit: keep end-to-end correlation IDs from gateway to CICS logs.

Testing, deployment and support

Testing

  • Contract tests for every API against the OpenAPI definition.
  • Regression tests comparing API results with existing 3270 or batch outputs for the same data.
  • Performance tests for peak volumes, including mainframe CPU impact.

Deployment

  • Version APIs and keep old versions until consumers move.
  • Release COBOL and API changes together through the same pipeline.

Support

  • Plan CICS, z/OS Connect and compiler upgrades within IBM support windows.
  • Document API ownership and on-call between mainframe and cloud teams.

Request an estimate

Cost and timeline depend on your application, data and integrations, so we estimate each project individually rather than publish price ranges. IBM software, z/OS Connect and gateway licences are extra. Cost drivers: interface complexity, copybook quality, security integration, data volumes and testing.

Request an estimate for your application, or read legacy application modernization cost and ROI to build the business case.

FAQs

Do we have to rewrite COBOL to use APIs?

No. Tools such as z/OS Connect and CICS JSON web services expose existing COBOL programs as REST APIs, usually with little or no change to the business logic.

What is z/OS Connect?

An IBM product that exposes CICS, IMS, IBM MQ and Db2 assets as REST APIs described with OpenAPI, and lets COBOL and PL/I programs call external REST APIs.

Can COBOL programs call cloud services?

Yes. The z/OS Connect API requester generates COBOL copybooks from an OpenAPI document so programs can call REST APIs. CICS programs can also use the CICS WEB API.

Is CICS still supported?

Yes. IBM released CICS Transaction Server 6.3 in September 2025 under its Enhanced lifecycle policy.

Should analytics call mainframe APIs?

Usually not. Replicate data with change data capture to a cloud data platform for analytics and AI, and keep APIs for transactional use.

How do we secure mainframe APIs?

Put an API gateway in front, use OAuth, map identities to RACF, and expose only the operations consumers need.

How long does a COBOL API integration take?

A pilot with a few APIs often takes two to four months. Enterprise programmes with events, data replication and refactoring take a year or more.

Conclusion

COBOL and CICS remain current IBM platforms, so the main job is integration, not emergency replacement. Expose valuable transactions as secure, versioned APIs, add events and data replication for new workloads, automate delivery, and refactor or move capabilities behind those APIs only where the business case is clear.

Previous in this series: Lotus Notes/Domino to Power Platform or Modern Web Applications. Next: IBM i (AS/400) RPG Modernization.

Related services: Legacy Software Modernization · .NET Development · Microsoft Azure · AWS · Data and API Integration

Sources

Plan your mainframe API integration

Prominent.tech helps teams expose COBOL and CICS transactions as secure, versioned APIs, add event and data replication paths, and plan capability-by-capability modernization behind those APIs. Talk to our modernization team or explore our legacy software modernization services.

From insight to implementation

Turn these ideas into a practical plan

Discuss how the ideas in this article apply to your business, systems and data. We’ll help you identify a focused first step.