The RPG converter lets you generate the code architecture that you want. In this example we use it to generate GUI code to visualize graphically how RPG file operations work.

To allow the GUI visualization code to access the structure of the records, we generate for each record type code such as the following.

@Override
public String columnText(int columnNumber) {
    switch(columnNumber) {
    case 0: return clientCode.toString();
    case 1: return clientName.toString();
    default: return "";
    }
}

In this example, we are using the SWT toolkit (on which Eclipse is built upon). Of course you can use the toolkit of your choice. Here is a fragment of the graphical code that accesses and displays records in a SWT table.

TableItem item = new TableItem(viewer.table, SWT.NONE);
for(int i=0; i

The result is a graphical view of the RPG file operations.

You can use it as a visual debugger for your RPG applications. Contact info@neograms.com to receive a free copy.