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

RPG

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Compiles 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

RPG [textfile] [,[uslfile] [,[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.

uslfile

The actual file designator of the user subprogram library (USL) file to which the object program is written. This can be any binary input file with a file code of USL or 1024. Its formal file designator is RPGUSL. If the uslfile parameter is omitted, the object code is saved to the temporary file $OLDPASS. If entered, this parameter refers to a file created in one of four ways:

  • By using the MPE/iX SAVE command to save the default USL file created during a previous compilation.

  • By building the USL with the MPE segmenter -BUILDUSL command. Refer to the MPE Segmenter Reference Manual (30000-90011).

  • By creating a new USL file with the MPE/iX BUILD command and specifying a file code of USL or 1024.

  • By specifying a nonexistent uslfile parameter, thereby creating a permanent file of the correct size and type.

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 to be merged against textfile to produce a composite source. This can be any ASCII input file. The formal file designator is RPGMAST. Default is that the master file is not read, and 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 textfile and 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 this command (RPGTEXT, RPGUSL, 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 an RPG program onto a user subprogram library (USL) file on disk. If you do not specify textfile, MPE/iX expects input from your standard input device. If you create the USL file before compiling the source code, you must assign it a file code of USL or 1024.

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

The following example compiles an RPG program entered from your standard input device, stores the object code in the default USL file $OLDPASS, and sends the listing to the standard list device:

  RPG

The next example compiles an RPG program contained in the disk file SOURCE. The object code is stored in the USL file OBJECT, which is a permanent disk file created with the BUILD command. The program listing is sent to the disk file LISTFL:

  BUILD OBJECT;CODE=USL

RPG SOURCE,OBJECT,LISTFL

To compile an RPG program and store the object code in the USL file OBJECT (created during the compilation process), enter:

  RPG SOURCE,OBJECT,LISTFL

Related Information

Commands

RPGGO, RPGPREP, PREP, RUN

Manuals

MPE Segmenter Reference Manual

RPG/3000 Compiler Reference Manual

Feedback to webmaster