
Chapter 6 509
Command Definitions P-R
RPG
NOTE The formal file designators used in this command (RPGTEXT, RPGUSL,
RPGLIST, RPGMAST, and RPGNEW) cannot be backreferenced as actual file
designators in the command parameter list. For further information, refer to
the "Implicit FILE Commands for Subsystems" discussion of the FILE
command.
Operation Notes
This command compiles an RPG program onto a user subprogram library (USL) file on
disk. If you do not specify textfile, MPE/iX expects input from your standard input device.
If you create the USL file before compiling the source code, you must assign it a file code of
USL or 1024.
Use
This command may be issued from a session, job, or program. It may not be issued in
BREAK. Pressing
Break suspends the execution of this command. Entering the RESUME
command continues the execution.
Examples
The following example compiles an RPG program entered from your standard input device,
stores the object code in the default USL file $OLDPASS, and sends the listing to the
standard list device:
RPG
The next example compiles an RPG program contained in the disk file SOURCE. The object
code is stored in the USL file OBJECT, which is a permanent disk file created with the
BUILD command. The program listing is sent to the disk file LISTFL:
BUILD OBJECT;CODE=USL
RPG SOURCE,OBJECT,LISTFL
To compile an RPG program and store the object code in the USL file OBJECT (created
during the compilation process), enter:
RPG SOURCE,OBJECT,LISTFL
Related Information
Commands RPGGO, RPGPREP, PREP, RUN
Manuals MPE Segmenter Reference Manual
RPG/3000 Compiler Reference Manual