---
id: 17263
lang: en
title: "AWS shows how to move banking Assembler code to Java through COBOL in five stages"
published_at: "2026-11-21 02:05:16"
source_name: "AWS Machine Learning Blog"
source_url: "https://aws.amazon.com/blogs/machine-learning/modernizing-mainframe-assembler-to-java-using-amazon-bedrock-and-aws-transform/"
canonical_url: "https://news.hamidun.com/en/news/17263"
categories: ["llm", "business"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# AWS shows how to move banking Assembler code to Java through COBOL in five stages

> **Краткая суть (BLUF):** Banks and insurers still run nightly batch jobs written in Assembler, a language that sits close to machine instructions and that fewer and fewer people can read. AWS recommends not moving straight to Java but going through five stages: AI extracts business rules, writes them out as COBOL (an intermediate language that domain experts can read), and AWS Transform converts that COBOL into Java Spring Boot. Experts check every step, so rules that were forgotten along the way do not get lost.  • Bedrock is called with temperature 0, so answers do not change from run to run • The model returns the extracted rules as JSON, numbered BR001, BR002, and so on • The AI's answers are treated as a draft, and experts review them before code generation

Imagine a batch job that has run every night without failure for decades, and the only person who understands its code is about to retire. AWS says it regularly sees this situation at banks, insurance companies, and airlines. Their critical processes run on Assembler, a language close to processor machine instructions, where the business meaning is buried in operations on registers and memory. Fewer and fewer specialists can read this code. Rewriting it by hand can take years, and there is a risk of breaking rules that nobody remembers anymore. That is why AWS has published a methodology: AI takes on part of the work, and the business logic is verified at every step.

## Why COBOL sits in the middle

The core idea of the methodology is not to convert Assembler to Java directly. First, the code is turned into COBOL, an older language for business computing that reads almost like a description of operations. Then the AWS Transform service converts the COBOL into applications on Java Spring Boot, that is, into ordinary services for the AWS cloud. According to AWS, this route is more reliable than a direct one. The intermediate COBOL is understandable to domain experts, who can check the logic before the final translation. If existing COBOL code is already available, the Assembler stage is skipped and the code goes straight into AWS Transform.

The source system looks classic. JCL jobs run Assembler programs on a schedule. The programs read VSAM files and ordinary sequential files, work with an IBM Db2 for z/OS database, and write results to files or tables. They report completion through JCL return codes. All of this runs on an IBM z/OS mainframe.

## The five stages step by step

Stage one is Business Rules Extraction (BRE). A model in Amazon Bedrock or in the Kiro IDE receives the Assembler code along with its documentation. It returns JSON: each rule with a number (BR001, BR002, and so on), a name, a purpose, input and output fields, and trigger conditions. There is also a mapping table showing which register or memory area becomes which variable in COBOL. The more context you give the model (data dictionaries, process descriptions), the more accurate the result.

Stage two is the functional specification. Based on the rules, the model drafts a description of the future program: COBOL data structures, the sequence of steps, and a coverage map showing where in the code each rule is implemented. Stage three is generating the intermediate COBOL from that specification. Next comes verification and the translation to Java through AWS Transform, with functional equivalence tests: the old and new code must produce identical results on the same data.

## Practical tips and limitations

Some of the advice is useful beyond AWS. The model's temperature is set to 0 so that results do not change from run to run. For a large number of programs, the same prompts are called through the Bedrock Converse API, and each result is stored in an Amazon S3 bucket, where the next stage picks it up. Testing should be done on anonymized data, not on production or personal data. The model should be chosen for strong code understanding and a large context window, because Assembler programs are long and dense. AWS adds that Bedrock does not use your prompts and responses to train AWS models and does not share them with third parties.

The human role matters most. AWS explicitly calls the rule documents drafts. Experts must review them, record discrepancies in a log, and update the document before moving on. Block diagrams and data flow diagrams are useful for the review. A checklist also helps: are the rules correct, are the fields mapped properly, are edge cases and errors covered?

There are caveats too. The material contains no measured results. AWS speaks only of "reduced time compared with the manual approach," without percentages, timelines, or client names. The published excerpt ends at the COBOL conversion stage, so the details of verification and the final translation are not covered here. In addition, if the model checks the code itself, its assessment does not replace a run on real test data with known outputs. That is why AWS's prerequisites specify test data sets with expected outputs.

The practical takeaway for teams with legacy systems: process discipline matters more than any particular model. First, the rules are captured in a document. Then comes readable intermediate code, and people and tests verify the result at each step. The pattern can be repeated without AWS by substituting your own models and tools.

---
- **Первоисточник:** [AWS Machine Learning Blog](https://aws.amazon.com/blogs/machine-learning/modernizing-mainframe-assembler-to-java-using-amazon-bedrock-and-aws-transform/)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/17263
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
