Problem solve Get help with specific problems with your technologies, process and projects.

How to retrieve the RPGLE source

It is possible to retrieve source from RPG programs, as long as the program has been compiled with the correct parameters.

It is possible to retrieve source from RPG programs if the program has been compiled with the correct parameters. The following procedure will retrieve the source from single-module RPGLE programs compiled with CRTBNDRPG with DBGVIEW(*LIST).

We have changed our command default to this option to allow debugging on our production machine, which does not contain program source. The program could be modified to handle RPG III programs compiled with OPTION(*LSTDBG) and multiple module ILE programs. As far as I know, the retrieval works with the exception of list directives (i.e. /EJECT) and color/highlight special characters.

Download the code:






  • Utility helps you trace RPGLE programs
    Not too long ago member Eitan Rosenberg had to trace RPGLE program. He realized that there is no real option to do that, so he decided to write a simple trace utility and share it with the rest of the community.

  • Create from the source
    How many times have you recompiled an object only to find out later that you forgot to specify a particular keyword value to the compiler? member Jeff Bull says CRTFMSRC allows you to encode these compiler/create options in with the source code.
  • Recursive call in RPG ILE
    Often people think that RPG does not allow recursive calls. Actually, says member Michael Fiorillo, ILE RPG does allow recursion. A program cannot call itself, but it can call a subprocedure that calls itself.

Dig Deeper on iSeries CL programming