Compiling Only [ HP RPG/XL Programmer's Guide ] MPE/iX 5.0 Documentation
HP RPG/XL Programmer's Guide
Compiling Only
This section explains how to compile a program without linking or
executing it. You may want to do this, for instance, when you're in the
initial stages of developing a program and you want to know where the
compiler errors are. You must compile-only when the program contains
external subroutines because they must be linked to the program in a
separate step using the LINK command (see the LINK command in the HP Link
Editor/XL Reference Manual).
There are two ways to compile a program. You can use the MPE XL command
RPGXL or, if you're using RISE to develop a program, you can use the RISE
VERIFY command to compile it. (For information on RISE, see the RPG
Utilities Reference Manual.)
Figure 6-5 shows how to compile a program from a job file. The job file
is named GL50.JOB and contains an RPGXL command that compiles the
program, GL50S.SOURCE. RPGXL directs the compiler to create the
relocatable object file GL50O.OBJECT for the program. (The relocatable
object file is not executable; it must be converted to an executable
program file using the HP Link Editor/XL LINK command. See the HP Link
Editor/XL Reference Manual for details about creating an executable
program file.)
To start the compile job shown in Figure 6-5, enter the command,
:STREAM GL50.JOB
_____________________________________________________________
| |
| !JOB GL50,MGR.ACCTG |
| !RPGXL GL50S.SOURCE,GL500.OBJECT |
| !TELL MGR.ACCTG;PROGRAM GL50 COMPILED SUCCESSFULLY|
| !EOJ |
| |
_____________________________________________________________
Figure 6-5. Compiling an RPG Program From a Job File
To compile GL50S.SOURCE in session mode, enter this command,
:RPGXL GL50S.SOURCE,GL50O.OBJECT
In both the job and session examples above, the program listing is
written to $STDLIST.
MPE/iX 5.0 Documentation