Modernization
IBM z/OS Connect maps REST/JSON requests defined by an OpenAPI document onto COBOL programs: it converts JSON to the COBOL COMMAREA or container layout (generated from the copybook), calls the CICS or IMS program (or Db2 / MQ), and converts the response bac…
40.1 Strategies
Retain & improve Keep COBOL on Z; recompile with modern compilers, clean up code, add tests Expose as APIs
Wrap CICS/IMS/batch logic in REST APIs (IBM z/OS Connect) for web and mobile clients
Event and message integration: IBM MQ, Kafka, change data capture from Db2/VSAM/IMS
Restructure COBOL (remove GO TO, split monoliths, extract services) or convert selected modules to Java Rehost / replatform
Move COBOL to Linux/cloud with emulation runtimes (Rocket Enterprise Server, AWS Mainframe Modernization replatform) Rewrite / replace
Rebuild in another language or buy a package High — many large rewrites have failed or overrun
40.2 APIs with z/OS Connect
IBM z/OS Connect maps REST/JSON requests defined by an OpenAPI document onto COBOL programs: it converts JSON to the COBOL COMMAREA or container layout (generated from the copybook), calls the CICS or IMS program (or Db2 / MQ), and converts the response back to JSON. COBOL code is often unchanged. It also supports API requester — COBOL programs calling external REST APIs.
40.3 COBOL and Java
IBM Enterprise COBOL supports interoperation with Java (OO COBOL syntax and, in recent releases, simpler mechanisms for COBOL–Java calls in the same address space). Java on z/OS runs on zIIP specialty processors, which can reduce software costs.
CICS runs Java (Liberty, JCICS API) side by side with COBOL; programs LINK to each other using channels and containers.
AI-assisted transformation: IBM watsonx Code Assistant for Z helps explain COBOL, refactor it into services, and translate selected COBOL to Java; other vendors and cloud providers offer similar tooling. Always verify generated code with tests.
40.4 Refactoring checklist
Build a safety net: regression tests that capture current outputs (files, reports, database changes).
Remove dead code and unused copybooks (static analysis tools: IBM ADDI, Broadcom, SonarQube COBOL rules, CAST).
Replace GO TO/ALTER/NEXT SENTENCE with structured constructs; break large paragraphs.
Isolate business rules from I/O; document rules where they live.
Externalize hard-coded values to tables or configuration.
Upgrade to a current compiler; fix warnings; enable INITCHECK/NUMCHECK in test.
40.5 Migration pitfalls
EBCDIC vs ASCII: collating sequence differs (in EBCDIC, lowercase < uppercase < digits; in ASCII, digits < uppercase < lowercase) — sorts and range checks can change results.
Packed and binary data cannot be converted with a simple character translation — use copybook-driven conversion.
Assumptions about JCL, VSAM, CICS, security (RACF), and scheduling must all be re-implemented, and performance and batch windows on the new platform proven with production volumes.