Posted on 1.4.2020.

Automatically convert Java to RPG and gain 20x developer productivity

Are you managing legacy applications? Then you probably have to deal daily with legacy code such as this horror: -> s.startsWith("A")).forEach(System.out::println);

And we know this is making your professional life miserable:
– Inability to hire knowledgeable experts (only mutant turtles understand lambdas)
– Huge amount of pointless overhead, such as unit tests and source code repositories
Poor developer productivity wrt. the best industry standard metrics such as lines per day
Bad coding practices such as lack of comments, obvious in this example
Cost of hardware, as even running a basic IDE requires at least a VGA screen

As a professional, your mission is to provide efficient and reliable solutions, but what are your options?

Hopefully there is a way out of this legacy nightmare. Neograms just released version 0.Ɛ of its “Java to RPG” converter, which will automatically convert this gibberish into a maintainable and efficient RPG IV program (see listing in Figure 1 below). And for a modest additional fee we can also provide RPG II code on punchcards shipped to you by horseback carrier.


Let’s get straight to the bottom line and talk productivity:

  • Legacy program: 1 line
  • Converted program: 20 lines (not counting comments)

Increase in developer productivity: 20 times


But coding practice is not only about writing code, it’s about reading it. Note how the converter automatically suggested meaningful names for you:

  • XBC044, QS36FS, YPI282

Automatic documentation

The converter also automatically generated documentation (remember, there was no documentation at all in the legacy code). Now the converted program comes with 12 lines of comments, a vast improvement over the previous situation.


And finally, let’s not forget usability. Complex and confusing user interfaces are automatically replaced with familiar, simple and efficient green screens.

Before conversion (legacy web page)

After conversion (modern green screen)


It’s difficult in a short article to let you fully appreciate the beauty of RPG programming. To go further, try the “Java to RPG converter” on your legacy Java application and see the results for yourself.

Figure 1: RPG code generated from the above legacy code by the automated converter.
Note the improvements in readability and productivity.
     H*  PROGRAM ID. HLWRLD                                                 *
     H*                                                                     *
     H*  CONVERTED BY NEOGRAMS               DATE : 01/APR/20               *
     H*  ORIGINAL JAVA PROGRAM Hello World   DATE : 31/MAR/20               *
     FDATA00A   IF   E           K DISK
     C     DEFKEY        KLIST
     C                   KFLD                    XBC044
     C     P@PRM1        PLIST
     C                   PARM                    QS36FS           50           
     C                   MOVEL     *BLANKS       QS36FS           50
     C                   READ      DATA00R                                90
     C     *IN90         DOWEQ     '0'
     C                   MOVEL     QS36FS        XBC044
     C                   CALL      'YPI282'      P@PRM1
     C     XBC044(1)     IFEQ      'A' 
     C                   DSPLY     QS36FS
     C                   READ      DATA00R                                90
     C                   ENDIF
     C                   ENDDO
     C                   SETON                                            LR
     C                   RETURN