COBOL to Java Online Presentation

Demo presentation text:


Today we’d like to show you how to migrate files from Cobol to Java with the help of IspirerMigrationCommander and IspirerMigrationStudio tools. Let`s start with IspirerMigrationCommander. First, we need to select the source and target languages, our source language will be Cobol, target language – Java. At the left side of the tool we should choose a source file for migration, at the right side of the tool we choose a folder for migration results. Once the file has been selected, we press button Run. At the bottom of the tool we can see some logs and comments for our migration process. It contains information on the total number of files, its names and size.

In this demo we have one simple file with code written in Cobol. Let`s open this file and migration results. Here we can see identification division, it contains some definitions like program-id, author and etc. After that, we can see structure SCLCA. We need to save some states during our work with database. For example sclcode serves to put code of exception. In Java it looks like public class with the same variables, but we can see some differences in datatypes. After definition of class we need to create a new object. The next structure looks the same.

Simple definition of variables in Java looks the same.

Next, in the source there is procedure division. To implement it in Java we should create constructor of class and call inside of it with the name ClassNameProcedureDivision. Then, we can see definition of this method.

In the source we can see block of code which contains 2 sql-statements: without result and with result. In Java we have a special additional class TransactionObject which can help us to execute statements.

The first statement is without result, and to get the result we should use special Java-class ResultSet. Here we can see try-catch block to catch some sqlexceptions.

Finally I would like to show you TransactionObject class. It contains Connection to Database, instance, constructor, method getConnection(), getInstance() and execute() and executeWithResult().

Let`s look at this code in IspirerMigrationStudio.

At the left side of the tool we can see our source file, specified source and target languages – Cobol and Java. Press button Run. At the bottom of the tool we can see some comments and logs of the migration process. At the right side we can see the result of the migration. It looks the same as in IspirerMigrationCommander.

Finally I would like to show you this code in IDE, in our case it is NetBeans. We have the project with the same hierarchy as we got after migration. As you can see, the whole code is compiled.

So, this is how our tool can proceed with COBOL. Hope this Demo was useful. Feel free to contact us for more information about our conversion tools and services. Thank you for your attention!

Do you want to move from COBOL to Java?

Let's do it together!

Learn more