There are two options for compiling RPG programs on the IBM AS/400 system. The first option involves a direct source-to-program process. The second option is a two-phase process that involves creating an intermediate *MODULE object, and then binding that object into a program. The normal approach for compilation of RPG IV programs is a two-phased process. This uses the CRTRPGMOD (Create RPG Module) and the CRTPGM (Create Bound Program) commands.
The CRTRPGMOD command syntax checks and compiles a single source file. The output is a *MODULE object. The CRTPGM command accepts one or more *MODULE objects and binds them into a single executable program.
The other approach to compiling RPG program is to use the CRTBNDRPG (Create Bound RPG Program) command. This command performs a source-to-program compilation of a single source file. The normal two-phase compile process is automated. The intermediate *MODULE object is deleted upon successful binding of the program. This appendix describes the CRTBNDRPG command parameters in detail.