HP 3000 Manuals

Executing an RPG Program [ HP RPG/XL Programmer's Guide ] MPE/iX 5.0 Documentation


HP RPG/XL Programmer's Guide

Chapter 7  Executing an RPG Program 

This chapter describes how to execute an RPG program and how to use the
RPG DEBUG feature during execution.  It also explains how to interpret
various run-time messages that you may encounter and what to do about
them.  And finally, it gives general tips on how to avoid run-time
errors.

There are three ways to execute an RPG program:

Use this (these)    When you want to: 
MPE XL Command(s): 

RPGXLGO             Compile, link and execute the program in one step.
                    This method is handy during initial program testing.
                    For an explanation of this method, see "Compiling,
                    Linking and Executing" in Chapter 6.

RPGXLLK RUN         Compile and link the program in one step and execute
                    it in another.  If you do not enter a file name for
                    the executable program file, $OLDPASS is used.  To
                    run the executable program file, follow RPGXLLK with
                    the RUN command (see "RUN" below).

RUN                 Run an executable program file that was created
                    previously by a RPGXLLK command or by a HP Link
                    Editor/XL LINK command.  You normally execute
                    production programs or programs with minor changes
                    using the RUN command.

                    You can also run an executable program file by
                    omitting the word "RUN" and simply typing the
                    executable program file name at the operating system
                    prompt.

Figure 7-1 shows how to use RPGXLLK and RUN. This example compiles, links
and executes a program.  The program source file is GL50S.SOURCE and the
job file name is GL50.JOB. To execute this job file, enter the operating
system command,

     :STREAM GL50.JOB
_____________________________________________
|                                           |
|     !JOB  GL50,MGR.ACCTG                  |
|     !RPGXLLK  GL50S.SOURCE,  GL50P.PROGRAM|
|     !RUN  GL50P.PROGRAM                   |
|     !EOJ                                  |
|                                           |
_____________________________________________

          Figure 7-1.  Compiling, Linking and Executing an RPG Program 



MPE/iX 5.0 Documentation