AivexaNewsSearch
AI news for builders and product teamsChecked every hour

Modernizing mainframe Assembler to Java using Amazon Bedrock and AWS Transform

Collected Nov 16, 2026

AWS published a five-phase methodology for modernizing mainframe Assembler applications into Java Spring Boot services on AWS, aimed at banking, insurance and airline customers whose critical batch programs still run on IBM z/OS. The approach combines Amazon Bedrock, the Kiro IDE and AWS Transform, and routes the conversion through an intermediate COBOL stage rather than translating Assembler directly to Java. AWS argues this staged path reduces risk and preserves business logic, because the intermediate COBOL is readable enough for subject matter experts to validate before the final conversion.

The starting architecture is a familiar one: JCL jobs trigger Assembler programs on a schedule, those programs read VSAM and sequential files and operate against IBM Db2 for z/OS, and business logic is expressed through low-level register operations and memory management. Output lands in files or database tables, and job status comes back as JCL return codes. AWS describes this as a pattern it encounters repeatedly, with the pool of people able to read the code shrinking each year.

The five phases are business rules extraction, spec-driven data flow, Assembler-to-COBOL conversion, validation, and COBOL-to-Java transformation, with human checkpoints between them. Amazon Bedrock provides inference for the first four; AWS Transform handles the COBOL-to-Java step. Where COBOL source already exists alongside the Assembler, AWS says teams can skip the intermediate work and feed that COBOL directly to AWS Transform.

Prerequisites are concrete: an AWS account with least-privilege IAM permissions for Bedrock, AWS Transform and S3; access to Amazon Q Developer or Kiro for assisted code analysis; access to AWS Transform for COBOL-to-Java conversion; Bedrock access with suitable foundation models; an S3 bucket with encryption and Block Public Access enabled; and, less conventionally, business and technical experts available for validation sessions, a source code inventory with documentation, and test data sets with expected outputs for equivalence testing.

Phase one produces Business Rules Extraction documentation. AWS supplies a prompt that asks the model to enumerate every rule, including conditional logic, calculations, validations, transformations, error handling and loops, each with an ID such as BR001, a plain-English description, input and output fields or registers, and triggering conditions. It also asks for data mappings from register or memory location to COBOL variable names, with transformation logic and validation rules. The requested output is structured JSON, which makes the result machine-checkable and easy to feed into later phases.

The configuration advice is practical: pick a foundation model with strong code reasoning and a large context window, since Assembler programs are long and dense, and set temperature to zero for consistent output across runs. For volume, teams can call the same prompts through the Bedrock Converse API and write each result to S3 for the next phase. AWS states that Bedrock does not use prompts or outputs to train its models or share them with third parties, and it advises sanitized test data rather than production data or personally identifiable information. Including documentation, data dictionaries and business context alongside the code is framed as improving the model's grasp of business intent.

Extraction output is explicitly a draft. SMEs review the rules and record discrepancies in a validation log before moving on, supported by flowcharts and data flow diagrams and a checklist covering rule accuracy, mapping correctness, edge cases and error conditions. AWS warns that incomplete data mappings can lose or corrupt business logic, which makes this review the main control point in the whole pipeline.

Phase two turns validated rules into functional specifications: a program overview, COBOL data structures, process flow design and a business rule coverage map. The prompt prescribes COBOL conventions in some detail, including uppercase hyphenated names, PIC clauses for integers, decimals, alphanumerics and packed decimal, hierarchical levels from 01 to 88 condition names, and a JSON schema linking each rule to its implementation location and dependencies. The stated purpose is to lock down requirements before code generation and avoid costly rework.

Phase three generates COBOL from the specification plus the original Assembler, with strict formatting rules: sequence numbers in columns 1-6, indicator in column 7, division headers and level 01 entries in Area A, statements in Area B, aligned PIC and VALUE clauses, explicit scope terminators, and a mandatory header comment block. Each business rule is meant to get its own paragraph and a traceability comment citing its BR ID. The prompt requires the model to return only COBOL, with no commentary.

Phase four treats testing as continuous rather than final. AWS's validation prompt asks for six checks: syntax, structure, logic, data flow, BRE coverage and specification compliance. Each returns a pass flag or a score, culminating in a weighted equivalence score: syntax 20%, structure 20%, logic 30%, data flow 30%, with BRE coverage and specification compliance each adding 10%. A run counts as passed at 0.7 or above. A second part classifies quality (excellent at 0.9, good at 0.7, fair at 0.5), lists prioritized improvement areas and per-rule implementation quality, and produces an executive summary. Only then does AWS Transform perform the COBOL-to-Java Spring Boot conversion.

A likely trade-off is that the extra COBOL stage adds a hop and therefore cost and latency, but buys an artifact domain experts can actually audit. Assembler's heavy use of registers and memory addresses is exactly what a language model handles least reliably, so decomposing the job into rule extraction, specification and traceable generation is a reasonable hedge. The scoring weights are AWS's convention rather than a proven metric, and a passing equivalence score is not proof of production correctness; the guidance to maintain regression test data with expected outputs points at the real acceptance test. Teams also inherit a dependency on foundation model behavior, so re-running prompts after a model upgrade can shift output and arguments for pinning models and keeping generated artifacts under version control.

Why it matters: enterprises still running Assembler batch jobs face a demographic cliff as the programmers who understand them retire. This methodology gives platform and application teams a repeatable, reviewable pipeline rather than an all-at-once rewrite, though it assumes scarce SME time and existing test data, which in practice is the binding constraint. Expect the intermediate validation gates, not the model choice, to determine whether such projects succeed.

Read at AWS Machine Learning Blog

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

Legacy mainframe Assembler applications are costly to maintain and hard to staff. This post presents a multi-stage, AI-powered methodology using Amazon Bedrock, Kiro IDE, and AWS Transform to extract business rules, convert Assembler through an intermediate COBOL stage, and deploy modernized Java Spring Boot applications on AWS.