Caravel Express: Assisted reengineering of COBOL and RPG Legacy Systems

Modernizing Legacy SystemsTop

Modernizing a Legacy System implies a transformation, intended to benefit from new updated technology and become platform-free. In many cases, means rewriting the original functionality into a new language.

COBOL to JavaToday, transforming a legacy COBOL system to Java, is probably the most common type of project in the modernization ground.

A practical approach, found in many successful projects, is Manual Rewriting “line by line”.

There are advantages to this approach: even the systems that are poorly documented can reveal their core when reading the sources, as well as reducing the effort of understanding the whole thing. The risk seems also controlled: it is easy to verify the results right from the beginning. Even if final integration tests reveal unexpected issues, this method offers “early-stage alerts".

When compared with building an entirely new system, conversion allows to preserve functionality which is the main asset, saving a huge amount of time and effort.

Additionally the Rewriting methodology takes care of coding quality and improves future maintainability.

The “line by line” strategy”

The success of the rewriting “line by line” strategy depends on several key points. Establishing the transformation objectives, organizing  efficiently a multi-skill team, and ensuring a continuous feedback and verification mechanism.

Line by line strategy

Starting pointTop

The Caravel Express tool was initially developed  to assist the “line by line” Rewriting process with its main purpose being helping to generate Java lines.

Following an analysis phase, source lines were automatically transformed into their Java equivalents, reducing the load of manual rewriting as well as costs and risks too.

After the experience of millions of converted lines, the analysis became more accurate, so instead of “one by one”, the tool began to identify patterns —groups of functionally related lines— and advise the best way to convert them to a Java structure. Coding tools became more flexible, allowing different models of conversion, therefore approaching specific customer needs.

As a result, the tool has dramatically increased its precision and capability of automatic conversion, reaching up to 80% to 95% of the legacy lines. The capability of establishing specific conversion models at every level, offers a process similar to assisted reengineering.

Caravel Express Starting Point

Caravel Express OverviewTop

Express offers a highly automatized way to Legacy Systems Rewriting.

Supported by automatic tools, Express transforms the Legacy Source to Java, following a Model (Conversion Contract) which takes account of customer specifications and covers all aspects: technology, architecture or coding quality.

After a detailed analysis of sources performed by Caravel Express, a semantic tree is built for every object. Then, original structures and patterns are recognized, and transformation rules clearly defined.

Building the Conversion Contract is the first task to be achieved and probably the most important one. According to this document, the Express tool will be customized and the Java EE Prime automatically generated, producing a well-structured pure Java, object-oriented code.

Based on it, a team of Java technicians will accomplish the Manual Final Coding, which implies a reduced percentage of the conversion effort.

Caravel Express Overview

Architecture layers, frameworks, technology, persistence methods, coding rules , and restrictions can be all customized.

As mentioned above, the key point of the process is building the “Conversion Contract” containing all the requirements that will master the transformation.

Afterwards, the Caravel Express tool generates an elevated percentage of the legacy COBOL or RPG converted lines, producing a well-structured, pure Java, object-oriented code: The Java EE Prime.

The Testing stage will end this 3 steps process.

I. Automatic analysis and code generation. Deliverable: Java EE Prime.
II. Manual final coding. Deliverable: Java EE Final converted system.
III. Tools supported Testing. Deliverable: Java EE Final converted and certified system.

Conversion Contract. Express tool customizationTop

The Conversion Contract will specify all the conversion rules.

The Express tool will be customized, using Json rules specification mechanism.

Caravel Express

Conversion Contract specifications

  • Layer organization.
  • Framework compatibility.
  • Data model rules.
  • Section & Paragraph rules. Identified and defined patterns.
  • Data access methods.
  • Service access management architecture.
  • Flow model rules.
  • Legacy warnings and tips.
  • JUnit model definition.
  • Coding quality specifications.
  • Documentation rules and formats.
  • Performance optimization rules.

Team management: the productivity issueTop

Ask yourself a question: Who is the best technical person to be in charge of a COBOL/RPG to Java Rewriting process?

Aligning a rewriting team demands an understanding of goals, know-how, directives, supervision, verification, meetings, committees…

A key point of the process is an effective organization of a non-homogeneous Rewriting Team.

Java EE Prime is structured in a way that automatically synchronizes every individual task.

Everybody knows what to do at all times.

Java EE Prime: The alignment mechanismTop

Java EE Prime includes all the information that any member of the Rewriting Team needs.

In an homogeneous environment, the progress is easy to measure and verify. The process is continuously under effective control and assesment.

Express activities and deliverablesTop

The Reengineering will be performed by a team of programmers transforming/Rewriting manually every routine code to pure Java.

The resulting Java code will follow Customer specifications.

BASE100 will provide the transformation services oriented to reduce and simplify the programmers duties and reassure project delivery date. 6 activities, with 5 related deliverables:

  1. Management and Analysis of Legacy sources.
  2. Building and delivery of the Semantic Trees of every Legacy routine.
  3. Building and delivery of the skeleton of the various Java classes corresponding to every Legacy routine, according to the Customer's architecture layer organization.
  4. Building and delivery of the Java classes corresponding to the Data Structures included in every Legacy routine. These classes will be consequently referenced in the skeleton classes provided in deliverable III.
  5. Building and delivery of the Java methods corresponding to the original COBOL/RPG paragraphs. Each method will be the result of translating the Original Legacy Paragraph to Java nomenclature using CamelCase. These methods will be placed in its business logic class.
  6. Building and delivery of logic flow instructions. The original Legacy instruction representing logic flow will be translated to an appropriate Java equivalent code (or pseudo code if necessary). Building and delivery of JUnits and documentation.

Statistics and MethodologyTop

Caravel Express solves:

A conversion path open to continuous enhancement. At any time Conversion Contract can be revised and improved.

Even converted pieces already deployed in production can be reconverted in order to introduce new features and fulfill new requirements.

Every component of the team has the capability to verify and give a valuable feedback at all stages.

Every aspect of the Express tool can be modified and, after producing a fast new conversion, tested again in a continuous improvement and assessment process.

The progress of the project will provide operational experience that Express is ready to use.

Caravel Express Methodology