Progress 4GL to Java Online Presentation


Demo presentation text:

Hello!

Today in this demo I will show you how Ispirer Migration Commander converts files from Progress4GL to Java. First we need to configure migration options: the source language is Progress4GL, the target language is Java. Then we should choose source and target folders and files.

On the left there are sources, and on the right there is a result folder.

Then it`s important to specify additional files such as an ini-file and tables_ddl. To do this, we click options – migration. We need to specify a path to the ini-file and tables_ddl.

Sqlways.ini contains options for migration and tables_ddl contains tables definition. Now we are ready to start the migration. Let`s select necessary files and press the “Run” button.

At the bottom of the screen you can see logs of the migrations process, for example, information on the total number of files, the name of each file and etc.

For this demo we have chosen one CLS-file and some pairs of I and P files. The CLS-file contains a class definition and business logic: definition of variable, temp-tables definition, buffer definition, properties, constructor (constructor manipulates data contained in the database), destructor, some methods (methods also manipulate data contained in the database, as well as strings, objects of temp-tables and buffers);

I-files need to be included into P-files. These I-files contain some business logic, for example, input and output parameters, buffers, data manipulation from the database, manipulation of dates and etc. This file looks the same. Here we can see a Run-statement. It means that we should use code from this file.

Let`s look at our migration results. Since our cls-file contains a class-definition, we need to create a Java class with the same name. But before we name this class, we need to add imports of additional classes. Properties and variables look similar in both languages as well as constructors.

Java does not support destructor because it has its own garbage collector for automatic memory cleaning. Functions look the same. In the file with migration results we decided to use ORM Hibernate, that is why we can see additional classes for description of tables and mapping files for appropriate tables and classes settings. Classes have definition of variables as well as set and get methods.

HBM-files contain mapping. To start manipulating data from database we need to get connection, get current session to our database with the help of class HibernateUtil, get all records from the table.

To migrate pairs of I and P-files we should extract source code from I-file and place it into P-file, only after that we can migrate it. Also we need to create a Java class with the same name as P-file, because Java does not support any code outside of classes.

In the file with migration results we can see a class with some business logic. It`s similar to our source file.

Now we will show how IspirerMigrationStudio can perform the migration. We have a cls-file at the left side of the tool. We need to set source and target languages – Progress4Gl and Java, and we set options for migration – ini-file path and tables_dd-file path. At the bottom of the screen we can see logs of our migration process. At the left side we can see the source file, at the right side we can see a file with migration results.

You can see that the file with results looks the same as it was in IspirerMigrationCommander.

So, let`s look at this code in IDE NetBeans. We have a project with the same hierarchy as we got after the migration. You can see that the whole code is compiled. A Class for table, class for I and P-files, class for cls-file and etc. Mappings, class HibernateUtil. To adopt the code to your application you should set your specific options for connection to the database in hibernate configuration file. You can see that the migrated code has the same functionality as the source code.

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