HP (Hewlett-Packard) HP 3000 Laptop User Manual


 
Chapter 6 513
Command Definitions P-R
RPGPREP
Operation Notes
This command compiles and prepares an RPG program to a program file on disk. If you do
not specify textfile, MPE/iX expects the source program to be entered from your standard
input device. The USL file $OLDPASS, created during compilation, is a system-defined
temporary file passed directly to the MPE segmenter. You can access it only if you do not
use the $NEWPASS default for progfile. This is because the segmenter also uses $OLDPASS
to store the prepared program segments, overwriting any existing temporary files of that
name.
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
To compile and prepare an RPG program entered from your standard input device, and
send the listing to your standard list device, enter:
RPGPREP
The USL file created during compilation is a temporary file passed directly to the MPE
segmenter. You can access it under the name $OLDPASS only if the prepared program
segments are not also stored in $OLDPASS (which overwrites the USL file). Therefore, to
save the compiled USL and the prepared program file, specify a nonexistent file for progfile
in the RPGPREP command line and save the USL file $OLDPASS under another name. In
the following example, the prepared program is saved as COMFL, and the USL file is
renamed (and saved) to NUSL:
RPGPREP,COMFL
SAVE $OLDPASS,NUSL
Unless you have specifically created a permanent file to store the prepared program, the
program file COMFL is stored in the temporary file domain. To save it as a permanent file,
use the SAVE command:
SAVE COMFL
Using the BUILD command, you can create your own program file in the permanent file
domain. When you do so, be sure to specify a file code of PROG or 1029 and a numextents
parameter value of 1. Such a file is created in the next example. It is then used by the PREP
command.
BUILD PROGFL;CODE=PROG;DISC=,1
RPGPREP,PROGFL
To send the program listing to a device other than the default standard list device, use the
FILE command. In this example, the file equation assigns the file name LINEA to device
class LP (your line printer). LINEA is then backreferenced in the RPGPREP command line:
FILE LINEA;DEV=LP
RPGPREP,EDTDISC,COMFL,*LINEA