CHAPTERS
- 0:00 – 0:30
Demo setup: Using Claude Code on an AWS COBOL mainframe sample repo
The video frames a practical demo of Claude Code modernizing a legacy COBOL system using AWS Mainframe Modernization’s repository. It describes the scope of the sample application (a credit card management system) and why it’s representative of real-world legacy estates.
- •Demo target is AWS Mainframe Modernization demo repository
- •Codebase size: ~100 files including COBOL, copybooks, and JCL
- •System domain: credit card management / batch processing
- •Sets up the two-phase approach: discovery/documentation, then migration/verification
- 0:30 – 1:01
The legacy modernization problem: undocumented business logic and scarce COBOL expertise
The speaker highlights common constraints in COBOL estates: minimal documentation, business and regulatory rules embedded in code, and limited availability of experienced COBOL developers. This motivates an automated documentation-first approach.
- •Legacy code often has little to no documentation
- •Critical business/regulatory logic is encoded directly in COBOL
- •Original authors are typically gone from the organization
- •Hiring/retaining COBOL expertise is difficult
- 1:01 – 1:33
Creating a specialized COBOL documentation subagent in Claude Code
Claude Code is configured with a dedicated subagent designed for COBOL documentation and translation. The video explains how subagents run in parallel with isolated context to prevent cluttering the main thread.
- •Use of Claude Code /agent to create a COBOL documentation expert
- •Parallelizable subagents improve throughput
- •Isolated context windows reduce main-thread pollution
- •Thinking mode enabled for deeper analysis
- 1:33 – 2:03
Architectural analysis at scale: file-by-file tracking with a to-do list
Claude Code performs architecture analysis across all files, generating a tracked to-do list to ensure complete coverage without duplication. This emphasizes reliability and auditability in large codebase discovery work.
- •Analyzed architecture across 94 files
- •Maintained a progress-tracked to-do list
- •Prevents processing the same file twice
- •Ensures nothing is missed during discovery
- 2:03 – 2:33
Deep business workflow extraction: Interest calculation program (CBACT04C)
A concrete example shows the documentation going beyond comments by reconstructing end-to-end business behavior. The interest calculation module is explained in terms of inputs, lookups, fallback rules, and record updates.
- •Example module: CBACT04C (interest calculation)
- •Reads transaction category balances
- •Looks up interest rates by account group
- •Applies fallback-rate business rules
- •Updates account records according to workflow
- 2:33 – 3:04
Building navigational memory artifacts: name catalog and dependency map
Claude creates durable index files that translate cryptic program names and map dependencies across the system. These artifacts enable downstream visualization and faster comprehension for developers.
- •Generated memory files as plain text
- •Catalog.text translates program IDs into human-readable names
- •Relationships.text maps dependencies in pipe-delimited format
- •Indices serve as reusable navigation aids
- 3:04 – 3:34
Visualizing batch workflows with mermaid diagrams and dataflow mapping
Using the dependency indices, Claude generates mermaid diagrams that illustrate the daily batch processing flow. The chapter describes how data moves through posting, interest computation, and statement generation.
- •Auto-generated mermaid diagrams from dependency indices
- •Complete map of daily batch processing workflow
- •Dataflow from transaction input through posting
- •Interest calculation stage captured explicitly
- •Ends in customer statements output
- 3:34 – 4:05
Autonomous documentation run: throughput and scalability claims
The demo results in extensive documentation output over a sustained run, with an emphasis on autonomy and scalability. The speaker positions the approach as viable for much larger enterprises than the sample app.
- •Claude Code ran ~1 hour continuously in the demo
- •Produced 100+ pages of documentation
- •Capability cited: 30+ hours autonomous operation
- •Techniques described as scalable to larger codebases
- 4:05
Phase two begins: Planning a COBOL-to-Java migration strategy
After documentation, the focus shifts to migrating a core feature to Java, starting in planning mode to avoid premature edits. Claude identifies tricky COBOL patterns that influence design and translation choices.
- •Phase two: migration and verification
- •Selected core feature: CBACT04C migrated to Java
- •Switched to planning mode to reason before editing
- •Identified complex COBOL patterns (line breaks, multi-file coordination)
Five-phase migration plan: structure, models, I/O, logic preservation, test harnesses
Claude proposes a phased migration approach that covers engineering foundations and behavioral compatibility. The plan includes translating copybooks, matching file formats, preserving COBOL-specific behavior, and creating parallel test systems.
- •Phase 1: create Java project structure
- •Phase 2: translate copybooks into Java data model classes
- •Phase 3: build I/O compatible with original file formats
- •Phase 4: convert business logic while preserving COBOL behaviors
- •Phase 5: dual test harness (GNU COBOL 3.2.0 + Java 17)
Producing maintainable, idiomatic Java (not just syntax translation)
The resulting Java is described as production-oriented, with modern structure and operational concerns. The emphasis is on code a contemporary team can own and evolve, rather than a mechanical conversion.
- •Generated proper Java classes and structure
- •Applied suitable design patterns
- •Added error handling and logging
- •Focused on maintainability for modern teams
Verification methodology: parity testing across outputs and intermediates
Claude validates equivalence by running multiple datasets against both implementations and comparing more than final results. Intermediate computations and file operations are checked to ensure true behavioral fidelity.
- •Created multiple test data files
- •Ran tests against COBOL and Java versions
- •Compared intermediate calculations and transformations
- •Validated file writes and processing steps, not only final output
Outcome and takeaway: bit-for-bit fidelity and confidence at scale
The demo concludes with perfect behavioral alignment between COBOL and Java, preserving edge cases and rules. The broader message is that these workflows scale beyond the demo and meaningfully accelerate modernization.
- •Achieved perfect bit-for-bit fidelity
- •Preserved calculations, business rules, and edge cases
- •Demo is smaller than typical enterprise estates
- •Claude Code positioned as enabling faster, more confident modernization
