
516 Chapter 6
Command Definitions P-R
RPGXL
Operation Notes
The RPGXL command compiles an RPG/XL program and stores the object code in a file on
disk. If textfile is not specified, RPG/XL expects the source program to be entered from your
standard input ($STDIN). If you do not specify listfile, RPG/XL sends the listing to your
standard list device ($STDLIST). If you omit the objectfile parameter, the object code is
saved in the temporary file domain as $OLDPASS. To keep it as a permanent file, you save
$OLDPASS under another name.
NOTE This command is implemented as a command file. If you set the HPPATH
variable to null (SETVAR HPPATH ""), the command file is not executed, and
the command fails.
Use
This command may be issued from a session, job, or program. It may not be used in
BREAK. Pressing
Break suspends the execution of this command. Entering the RESUME
command continues the execution.
Examples
The following example compiles an RPG/XL program entered from your standard input
device and stores the object code in the object file $OLDPASS. The listing is then sent to
your standard list device.
RPGXL
The next example compiles an RPG/XL program contained in the disk file RPGSRC, and
stores the object code in the object file MYRPGOBJ. The program listing is stored in the disk
file LISTFILE.
RPGXL RPGSRC,MYRPGOBJ,LISTFILE
NOTE Program development in native mode uses the MPE/iX LINK command not
the MPE V/E PREP command. This produces a significant difference in the
method of linking code.
If you have created an RPG program called MAIN and a FORTRAN subprogram, for
example, called SUB (each contained in a separate file) you might choose to handle it this
way in MPE V/E:
RPG MAIN, SOMEUSL
FTN SUB, SOMEUSL
:
PREP SOMEUSL, SOMEPROG
:
RUN SOMEPROG
The second command appends the code from SUB to SOMEUSL.
However, LINK (in MPE/iX native mode) does not append SUB. On MPE/iX, you must
compile the source files into separate object files and then use the Link Editor to link the
two object files into the program file, as in this example: