HPlogo MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 6 Command Definitions P-R

RPGPREP

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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

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 resides 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:

  • 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.

  • 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 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, 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 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

Related Information

Commands

RPG, RPGGO, PREP, RUN

Manuals

MPE Segmenter Reference Manual

RPG/3000 Compiler Reference Manual

Feedback to webmaster