RPGPREP



RPGPREP

     Compiles and prepares an RPG/V program in Compatibility
Mode. RPG/V is not part of the 900 Series HP 3000 Computer
System Fundamental Operating Software and must be purchased
separately. (CM)

SYNTAX

     RPGPREP [textfile][,[progfile][,[listfile][,masterfile][,[newfile]]]]

PARAMETERS

textfile            The actual file designator of the input file from
which the source program is read. This can be any
ASCII input file. The formal file designator is
RPGTEXT. Default is $STDIN.

progfile The actual file designator of the program to which
the prepared program segments are written. When you
omit progfile, the MPE Segmenter creates the program
file, which will reside in the temporary file domain
as $OLDPASS. If you do create your own program
file, however, you must do so in one of two ways

o By using the MPE/iX BUILD command, and specifying
a file code of 1029 or PROG, and a numextents value
of 1. This file is then used by the PREP command.

o By specifying a nonexistent file in the progfile
parameter, in which case a job or session file of
the correct size and type is created. Default is
that $NEWPASS is assigned.

listfile The actual file designator of the file on which the
program listing is written. This can be any ASCII
output file. The formal file designator is RPGLIST.
Default is $STDLIST.

masterfile The actual file designator of the master file that
is merged against textfile to produce a composite
sourcefile. This can be any ASCII input file. The
formal file designator is RPGMAST. Default is that
master file is not read; input is read from
textfile, or from $STDIN if textfile is not
specified. If two files being merged have identical
line numbers, the lines from textfile or from $STDIN
will overwrite those in masterfile.

newfile The actual file designator of the file produced by
merging the textfile and the masterfile. This can
be any ASCII output file. The formal file
designator is RPGNEW. Default is that no file is written.

NOTE

The formal file designators used in the command (RPGTEXT, RPGLIST,
PRGMAST, and RPGNEW) cannot be backreferenced as actual file designators
in the command parameter list. For further information, refer to
"IMPLICIT FILE COMMANDS FOR SUBSYSTEMS" discussion of MPE/iX FILE command.

OPERATION

     This command compiles and prepares an RPG program to a
program file on disk. If you do not specify textfile, MPE
XL 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.

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 RESUME continues the execution.

EXAMPLE(S)

     To compile and prepare an RPG program entered from your
standard input device, sending 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 will overwrite 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 will be 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.
In the next example, such a file is created and 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

ADDITIONAL INFORMATION

Commands:   RPG, RPGGO

Manuals :   MPE Segmenter Reference Manual (32650-60026)
            RPG/3000 Compiler Reference Manual (32104-90001)