From inherited code to deliberate change

The platform can change.
The business
still has to run.

Every change to a critical application raises the same question: what else depends on this behaviour? Trazadera modernAIze helps your team understand the source, decide the target and inspect the resulting project before migration.

01 / The business logic

Begin with the rule
the business relies on.

A rewrite can compile and still calculate a different amount. Before changing the implementation, make the expected behaviour explicit. In our Order Management demo, that starts with a percentage discount.

Order Management · COBOL example

Calculate the discount.
Subtract it from the order.

Order amount
1,000.00
Discount
10%
Expected net amount
900.00
The original calculationORDCALC.cbl · source excerpt
COMPUTE WS-DISCOUNT-AMOUNT =
    ORD-AMOUNT * ORD-DISCOUNT-PCT / 100
COMPUTE ORD-NET-AMOUNT = ORD-AMOUNT - WS-DISCOUNT-AMOUNT.

The source rule gives the team a concrete result to check in the target implementation.

Synthetic demonstration: three COBOL programs and one shared copybook, with a prepared Java / Spring Boot target.

02 / The dependencies

Choose the boundary
before the rewrite.

The calculation is only one part of the application. Its callers, validation logic and shared data layout determine what can change together. Modernization starts by making those relationships visible.

modernAIze Order Management landscape showing the shared order contract, orchestration, pricing and validation regions.Enlarge
modernAIze demonstration · four regions organise the work; their dependencies still need to inform the migration plan.

One record, three programs.

ORDMAIN, ORDCALC and ORDVALID all use ORDREC. Changing the shared layout means reviewing every program that relies on it.

A call can come back.

Calculation and validation can call each other when the net amount is negative. That return path belongs in the design and the tests.

See the guarded return in the COBOL source

Check the counter’s meaning.

ORDVALID increments the counter after a negative result and calls calculation again while it is below three. The Java target counts calculation attempts. Those meanings need an explicit review.

IF ORD-NET-AMOUNT < 0
    ADD 1 TO ORD-RETRY-COUNT
    IF ORD-RETRY-COUNT < 3
        CALL 'ORDCALC' USING ORD-RECORD

03 / The target decisions

Keep the responsibilities.
Choose their new shape.

modernAIze uses deterministic parsing and AI enrichment to build a semantic model for review. Your team decides the target structure and blueprint conventions. In this demo, Java services separate orchestration, calculation and validation around a typed order record.

Source responsibilityJava / Spring Boot targetDecision to review
Orchestrate the orderORDMAIN
OrderProcessingService

Where the sequence starts, ends and records its result.

Calculate the discountORDCALC
DiscountCalculationService

Decimal precision and rounding of monetary values.

Validate the resultORDVALID
OrderValidationService

Invalid outcomes, retry limits and counter semantics.

Share the order contractORDREC
Order

Field types, status values and how updates propagate.

See the Java calculation
BigDecimal discount = order.amount()
    .multiply(order.discountPercentage())
    .divide(ONE_HUNDRED, 2, RoundingMode.HALF_UP);
return order.withCalculation(order.amount().subtract(discount));

This target uses BigDecimal and rounds the discount to two decimal places with HALF_UP. Rounding behaviour is a design choice to validate against the source.

Setup establishes the source boundary. Understand exposes the model. Optimize records target decisions. Modernaize produces the project to inspect.

Explore modernAIze

04 / The verification

Make acceptance
something you can check.

The target should arrive with readable files and specific checks. The prepared Spring Boot project compiles and its two tests pass. They establish a useful starting point for a wider acceptance plan.

17project files
2 / 2tests passed
Application runtimeNot exercised in this demonstration

Calculation test

1,000.00 at 10% becomes 900.00.

The target’s discount service returns the expected net amount for the example order.

Processing test

Calculate, validate and record the result.

The order returns with a valid status, one calculation attempt and an entry in the in-memory audit repository.

Inspect the target project
modernAIze file browser showing the Order Management Spring project and OrderProcessingService.java.Enlarge
Prepared demonstration output · services, shared types, API, repository and tests remain available for review.
See the recorded verification results
modernAIze verification report with passing compilation and tests; runtime marked not run.Enlarge
The report distinguishes compilation and test results from application runtime checks that have not been performed.

Agree the difficult cases before cutover.

Extend the checks to decimal boundaries, invalid discounts, retry behaviour and downstream integrations. Passing these two tests does not establish complete equivalence with the COBOL application.

Start with one application boundary

Which behaviour
must survive the change?

Bring a representative application, its shared data definitions and the business cases it must continue to support. We can establish what is understood, which target decisions need review and how acceptance will be measured.

Discuss an application