Migration & Modernization
Accelerate mainframe modernization with AWS Transform: A comprehensive refactor approach
AWS Transform, launched in May 2025, is the first agentic AI service for modernizing mainframe workloads at scale. The AI-powered mainframe agent accelerates mainframe modernization by automating complex, resource-intensive tasks across every phase of modernization from initial assessment to final deployment. You can streamline the migration of legacy mainframe applications, including COBOL, JCL, CICS, Db2, and VSAM to modern cloud environments cutting modernization timelines from years to months.
This post examines how AWS Transform’s latest features accelerate COBOL-to-Java migrations, using automated code analysis and AI-assisted refactoring to reduce the time, cost, and risk of mainframe modernization.
Automated Refactoring using AWS Transform
Mainframe modernization demands tailored solutions and must align with unique business needs. While tactical methodologies concentrate on augmentation and maintaining existing systems, strategic modernization presents four differentiated paths: replatform, refactor, replace, and reimagine.
Automated refactoring is a process that converts legacy mainframe code, such as COBOL into a modern language, such as Java using tools and patterns to preserve functionality. This approach automatically converts legacy mainframe applications into object-oriented Java applications, while preserving the original business logic. By using proven deterministic approaches to refactor mainframe applications, combined with generative AI, AWS Transform provides the ability to execute refactor pattern using AI agents.
Customers use automated refactoring when:
- Core application functionality meets business needs
- Talent risk is a concern with application development skills becoming an issue
- Cost savings are a driver, or an aggressive timeframe to complete the project
- Target environment is required to be modernized and not use any legacy technology stack
Figure 1 – Automated refactor
During a refactor project, application artifacts including source code, and data formats are transformed into modern technologies, delivering infrastructure and technology stack improvements while maintaining functional equivalence.
Phases of Automated refactoring
A typical automated refactoring engagement follows five phases: Discovery and assessment, migration planning and prioritization, automated code conversion, testing and deployment.

Figure 2 – AWS Transform in refactor engagement
Figure 2 shows how AWS Transform’s features support the different phases of refactor engagement. Now let us review each of these phases in detail along with supporting features of AWS Transform.
Phase 1: Discovery and assessment
During this phase, the existing mainframe environment is analyzed to understand application inventory, dependencies, complexity, and modernization readiness. It also involves identifying workload patterns, excluding inactive jobs and transactions from migration. All these serve as input to prioritize modernization patterns and optimize Return on Investment (ROI).
Code analysis
Mainframe applications tend to be monolithic systems containing millions of lines of legacy code, often developed over decades with incomplete documentation of the technology stack. AWS Transform’s Code analysis feature helps in understanding the existing technology landscape, measuring code complexity with metrics including lines of code and cyclomatic complexity. It also helps identify duplicate or missing components to assess inventory completeness and reveals critical dependencies between system components. Understanding these dependencies is critical to success because modernizing a component without knowing its dependencies can break integrated systems, cause data inconsistencies, and require expensive rework.
Different types of components like COBOL, JCL, database schema, schedule definitions, control cards are identified. The code complexity is summarized at the component, file type, and overall level.
Figure 3 – Code analysis results
Data analysis
Mainframe applications have complex mainframe data relationships that lack business context and clear visibility into dependencies across Db2, VSAM, and sequential files. Without understanding which programs read, write, update, or delete specific datasets, teams face significant risk of breaking integrated systems during modernization. This lack of data lineage and dependency mapping makes it difficult to plan migrations, sequence work effectively, and conduct impact analysis across heterogeneous data environments.
AWS Transform provides two features to address these problems, data lineage and data dictionary.
The Data lineage (in figure 4) feature helps mainframe modernization teams understand data and source code relationships when modernizing to AWS. It provides data lineage visibility, dependency mapping, CRUD operations, and data integrity preservation.
Figure 4 – Data lineage
The Data dictionary feature (in figure 5) automatically generates comprehensive data structure documentation from existing mainframe components. This capability provides the “what” (structure and meaning) to accompany the “where” (usage and relationships) of mainframe data provided by Data lineage. It is detailed documentation containing field definitions, business meanings, and data structure specifications.

Figure 5 – Data dictionary
Activity analysis
Organizations lack visibility into which mainframe jobs are actually used and how resources are consumed, making it difficult to prioritize modernization efforts or exclude inactive components. Without performance baselines and historical usage patterns, teams cannot optimize ROI, establish proper testing benchmarks, or make data-driven decisions about target architecture design.
AWS Transform includes activity metrics analysis, which parses System Management Facilities (SMF) records to reveal mainframe workload patterns. SMF is a core component of IBM mainframe systems that collects and records detailed data on system activity, job execution, and resource usage. By examining SMF Type 30 records for batch job performance and SMF Type 110 records for online Customer Information Control System (CICS) transactions we complement static code analysis with real execution data. This helps you understand resource consumption, identify unused components, and prioritize modernization efforts based on actual usage patterns. The capability answers key operational questions, such as which jobs are inactive and can be safely excluded from migration, which jobs consume the most CPU resources and require performance optimization, and which business domain workloads have the longest elapsed times impacting business operations.

Figure 6 – Batch activity analysis
AI-Powered Modernization Chat
AWS Transform’s enhanced knowledge base represents a comprehensive modernization intelligence platform that empowers both strategic decision-making and technical execution. The system aggregates critical insights across Business Rules, Technical Documentation, Activity Analysis, Dependency Graphs, Data Lineage, Data Dictionary, and scheduler information into a unified, AI-powered chat interface. This enables teams to ask natural language questions to identify optimization opportunities, prioritize modernization efforts, and generate targeted documentation summaries. The chat capability bridges business and technical perspectives by answering both strategic questions about component dependencies and data-centric queries.

Figure 7 – AI-powered chat
Phase 2: Migration planning and prioritization
Mainframe applications are typically large monoliths that support business-critical operations. Migrating the application as a big bang is a high-risk strategy that can result in project failure, excessive cost and duration, and significant business disruption. To manage this risk effectively, applications must be broken down into business domain (group of related features) with carefully planned migration strategies that include prioritization and sequencing based on dependencies.
AWS Transform helps identify these business domains, map components to business domains and study the dependencies between them. The dependencies serve as input to create a wave plan for migration.
Business logic extraction (BLE)
AWS Transform’s Business Logic Extraction feature uses AI agents to categorize mainframe applications across four hierarchical levels. These levels include Line of Business (e.g., Credit Cards, Loans), Business Functions/domains (e.g., Rewards, Gift Cards), Business Features (transaction/batch job logic and dependencies), and Component Level (specific business rules from COBOL and JCL files). This multi-level analysis translates complex legacy code into plain language, enabling teams to identify common functions and group them into business domains for effective migration planning. This feature provides clear visibility into embedded business processes and dependencies, helping both business stakeholders validate existing rules, and technical teams understand code-to-business logic mappings. Below image shows the four levels of analysis in BLE.
Figure 8 – Business logic extraction at four levels
Below image shows high level application summary and the business domains (functional groups) under the application.

Figure 9 – Application-level summary and Functional groups/Business domains
Code decomposition
The Code Decomposition Agent breaks down large mainframe applications into manageable business domains using semantic seeds. The seeds are used for creating logical domains and detecting dependencies to provide proper code separation. The combination of intelligent automation and dependency analysis reduces manual effort while improving decomposition accuracy. The output from BLE serves as input for code decomposition, automatically populating business domain classifications and seed suggestions.

Figure 10 – Decomposition based on business domains
Wave planning
Migration wave planning is a strategic approach to organizing your mainframe modernization journey. Based on the domains created, AWS Transform generates a migration wave plan. The plan provides the recommended order in which these domains should be migrated, analyzing factors like dependencies, complexity, and business criticality. This wave-based approach reduces risk through manageable increments, accelerates time to value with early deployments, and maintains business continuity while building stakeholder confidence through demonstrated wins.

Figure 11 – Business domains and wave plan
Phase 3: Automated code conversion
Based on the wave plan, application code from the identified business domains is submitted to the refactoring step for automatic conversion from legacy mainframe to modern technology.
AWS Transform’s refactor agent automates the conversion of legacy technology stacks into functionally equivalent modern Java implementations, with an optional reforge feature that further enhances code maintainability through AI-powered uplift and validation techniques.
Refactor
AWS Transform’s refactor capability automates code conversion, transforming COBOL to Java and JCL to Groovy scripts to modernize the complete application stack. The specialized AI agent maintains functional equivalence while producing readable, maintainable code, refactoring business domains in a sequence defined by human oversight. This comprehensive transformation includes both application code and associated databases and data stores, while implementing cloud best practices and design patterns. The conversion process can be executed repeatedly after initial calibration to accommodate ongoing codebase changes, ensuring consistent modernization outcomes. Configurable settings are available for engine version, target database, encoding, and additional parameters.

Figure 12 – Refactor results
Reforge
This optional step takes the next step of enhancing the codebase generated from the refactor step for long‑term maintainability. Reforge uses Large Language Models (LLMs) to apply advanced multi-agent code uplift and validation techniques. It adds helpful comments and updates code to modern best practices, improving understandability and maintainability. Reforge also includes non-regression confidence scoring and method-level unit tests.

Figure 13 – Original refactored vs Reforged code
Phase 4: Testing
Testing provides the critical assurance needed to mitigate risks in mainframe modernization projects, delivering key insights that enable decision-makers to confidently approve the transition from legacy to modernized applications. The technical complexity is substantial as applications process millions of records requiring data-intensive testing and translation between mainframe and modern formats. This is further compounded by numerous interconnected components and external dependencies. Refactor projects demand meticulous output comparison for functional equivalence, as even minor deviations can have serious business consequences. These challenges compound because testing occurs late in the lifecycle after significant investment, with iterative validation cycles creating cascading delays that frequently extend projects beyond planned timelines by several months.
AWS Transform introduced three AI-powered testing agents and capabilities, test plan generation, test data collection scripts, and test automation scripts, that automate and accelerate testing for mainframe modernization projects.
Testing features
1. Test plan generation: AWS Transform automatically generates functional test plans based on program, data, job, and scheduler dependencies. The result is a set of sequenced batch test cases organized by business functions and domains. This automation speeds up testing by reducing manual test case design, ensuring complete coverage through dependency analysis that identifies all integration points, and enables parallel test execution across business domains.

Figure 14 – Test plan and cases
2. Test data collection scripts: AWS Transform generates JCL scripts to collect input/output data from mainframe data stores (sequential files, VSAM, Db2), reducing manual effort, and accelerating data acquisition. While the feature generates collection scripts, it does not manage actual mainframe job submission or data transfer processes. These activities remain under mainframe system programmer control for security and governance purposes.

Figure 15 – Test data collection scripts
3. Test automation scripts: AWS Transform enables functional equivalence testing at scale in the modernized AWS environment. Tailored for refactor projects, it generates comprehensive functional test scripts based on the established test plan. Each script establishes initial conditions with test inputs, executes test case logic, and compares results against expected outcomes. This automation ensures consistent, repeatable test execution throughout modernization projects and integrates seamlessly with the AWS Transform testing landing zone.

Figure 16 – Test automation scripts
Together, these AI-powered capabilities expedite functional equivalence testing at scale. They are complemented by the Data Migrator tool migrating database schemas and data, the Compare tool for comparing data between legacy and modernized applications, and the Terminals tool to capture scenario scripts and videos.
Phase 5: Deployment
Organizations establish the necessary development, testing, and production environments while implementing CI/CD pipelines to automate deployment and testing workflows. However, teams often encounter slow, manual configuration processes and struggle to meet complex enterprise requirements when creating cloud environments for their refactored applications.
Deployment templates
AWS Transform helps you set up cloud environments for modernized mainframe applications by providing ready-to-use Infrastructure as Code (IaC) templates. Through the AWS Transform chat interface, you can access pre-built templates that create essential components like compute resources, databases, storage, and security controls. The templates are available in your preferred topology (standalone vs high availability) and formats including CloudFormation (CFN), AWS Cloud Development Kit (AWS CDK), and Terraform. This gives you the flexibility to deploy your infrastructure using your preferred IaC tool.

Figure 17 – Deployment templates
Architecture of highly available refactored application
Below figure shows the architecture of a mainframe workload after migration to AWS.

Figure 18 – Architecture of highly available refactored application
The key features of this architecture are:
- High availability setup with primary and standby components across two availability zones ensuring business continuity
- Cloud connectivity between customer data center and AWS Cloud through AWS Direct Connect
- Synchronous database replication between primary and standby databases
- Distributed caching layer utilizing ElastiCache for Redis
Key benefits of using AWS Transform in refactor engagements
- Accelerates discovery and assessment by automatically analyzing millions of lines of legacy code, identifying dependencies, and providing AI-powered insights
- Intelligently breaks down monolithic applications into business domains and generates automated wave plans for risk-managed, incremental migration
- Converts complex applications at scale while maintaining functional equivalence, with optional AI-driven code enhancement for long-term maintainability
- AI-powered testing agents accelerate test plan generation, data collection, and execution at scale
- Simplifies infrastructure provisioning through automated IaC templates
Conclusion
AWS Transform automates COBOL-to-Java conversion while maintaining functional equivalence. By combining intelligent code transformation with automated testing and deployment, it reduces modernization timelines from years to months, enabling confident migration of business-critical workloads to the cloud.
Additional AWS Transform for mainframe resources: