HP 3000 Manuals

Ch 12. RPG Compiler [ HP RPG/iX Reference Manual ] MPE/iX 5.0 Documentation


HP RPG/iX Reference Manual

Chapter 12  RPG Compiler 

When you compile an RPG program, the compiler reads the source program
file and produces either a relocatable object file (intermediate form of
an object program that must be converted to executable form by HP Link
Editor/iX) or an executable program file (the form of an object program
that is directly executable).  When a program is compiled, a list file is
produced which contains the source program listing and informational,
error and warning messages.  If you request it, the compiler also
produces a Cross-Reference listing.

This chapter discusses the MPE/iX commands that compile a program and the
compiler subsystem commands that determine the compiler options that are
used.  It also discusses the files used during compilation.

To compile a program successfully, the statements in the source program
must be in the correct order.  Figure 12-1  shows this order (compiler
subsystem commands start with $).  In summary, a source program file must
contain:

   *   Not more than one Header Specification (optional).

   *   At least one Input or Output Specification, unless all files are
       display type (the File Type Field (column 15) of the File
       Description Specification is D).
___________________________________________________________________________________
|                                                                                 |
|                1         2         3         4         5         6         7    |
|            678901234567890123456789012345678901234567890123456789012345678901234|
|              _______________________________________________________            |
|                                                                                 |
|            $CONTROL              (Compiler subsystem command optional)          |
|                                                                                 |
|            H                     (Header Specification optional)                |
|                                                                                 |
|            F                                                                    |
|            F                     (File Description Specifications optional)     |
|            F                                                                    |
|                                                                                 |
|            E                     (File Extension Specification optional)        |
|                                                                                 |
|            L                     (Line Counter Specification optional)          |
|                                                                                 |
|            I                                                                    |
|            I                     (Input Specifications optional)                |
|            I                                                                    |
|                                                                                 |
|            C                                                                    |
|            C                     (Calculation Specifications optional)          |
|            C                                                                    |
|                                                                                 |
|            O                                                                    |
|            O                     (Output Specifications optional)               |
|            O                                                                    |
|                                                                                 |
|                                                                                 |
___________________________________________________________________________________

          Figure 12-1.  The Format of an RPG Source Program File 



MPE/iX 5.0 Documentation