HP 3000 Manuals

RUN [ HP RPG/XL Utilities-Part 2 RISE ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 2 RISE

RUN 

RUN executes a prepared program.

Form 

         RU[N] progfile [,entrypoint] [;NOPRIV] [;LMAP] [;DEBUG]
                                      [;MAXDATA=segsize]
                                      [;PARM=num]
                                      [;STACK=stacksize]
                                      [;DL=dlsize]
                                      [;NOCB]
                                            P
                                      [;LIB=G]
                                            S

The parameters, preceded by a semicolon, can appear in any order.  The
RUN command is similar to the MPE :RUN command.  Because it is similar,
the syntax of RISE's RUN command is exactly the same as MPE's RUN command
syntax.  Therefore, delimiters between parameters are required.

Parameter Explanation 

progfile         Actual designator of program file that contains prepared
                 program.

entrypoint       Program entry point where execution is to begin.  May be
                 primary entry point of program or any secondary entry
                 point in program's outer block.  Default is primary
                 entry point.

NOPRIV           Declaration that program segments will be placed in
                 non-privileged mode capability.  This parameter is
                 intended for programs prepared with privileged mode
                 capabilities.  Normally, programs containing privileged
                 instructions are executed in privileged mode only if the
                 program was prepared with privileged mode.  If NOPRIV is
                 specified in the :RUN command, all program segments are
                 placed in non-privileged mode.  Library segments are not
                 affected because their mode is determined independently.
                 (Note that a program containing legally compiled
                 privileged code, placed in a non-privileged mode, may
                 abort when you attempt to execute it.)

LMAP             Request to produce a descriptive listing of the
                 allocated (loaded) program on file whose formal
                 designator is LOADLIST. If no :FILE command is found
                 that references LOADLIST, listing is sent to $STDLIST.
                 Default is no listing.

DEBUG            Request to issue a Debug call before the first
                 executable instruction of the program.  This parameter
                 is ignored when a non-privileged user runs a program
                 having privileged mode capability.  This parameter is
                 also ignored if the user does not have read and write
                 access to the program file.  Default is that DEBUG call
                 is not issued.

MAXDATA=         Maximum stack area (Z-DL) size permitted, in words.
segsize          This parameter is included if the size of DL-DB or Z-DB
                 areas will be changed during the program execution.
                 Default is that MPE assumes areas will not be changed.

PARM=num         Value that can be passed to program as a general
                 parameter for control or other purposes.  When program
                 is executed, this value can be retrieved from address Q
                 (initial) -4 where Q (initial) is Q address for outer
                 block of program.  Value can be octal number or signed
                 or unsigned decimal number.  Default is Q (initial) -4
                 address is filled with zeros.

stacksize        Size of initial local data area, Z-Q (initial), in
                 stack.  This value must exceed 511 words, and override
                 stacksize estimated by MPE Segmenter.  Default is
                 estimated by Segmenter.

DL= dlsize       DL-DB area to be initially assigned to stack.  This area
                 is of interest mainly in programmatic applications.  In
                 all cases, the DL-DB area is rounded upward so that the
                 distance from the beginning of the stack data segment to
                 the DB address is a multiple of 128 words.  Default is
                 estimated by the Segmenter.

NOCB             Request that file system not use stack segment (PCBX)
                 for its control blocks, even if sufficient space is
                 available.  This permits expansion of the stack (with
                 the DLSIZE and ZSIZE intrinsics) to the maximum possible
                 limit at a later time, but causes the file management
                 system to operate more slowly for this program.

LIB=G            Search segmented procedure libraries to satisfy external
                 references during allocation in the following order:
                 group library, account public library, system library.
                 Default is S.

LIB=P            Search segmented procedure library to satisfy external
                 references during allocation in the following order:
                 account public library, system library.  Default is S.

LIB=S            Search system library only to satisfy external
                 references during allocation.  This is the default.

Purpose 

The RUN command allows you to execute a prepared program.  It operates in
the same way that the MPE command :RUN operates.  Note that you can use
the VERIFY RPG and VERIFY PREP commands to compile and prepare your work
file into a program file to be executed with this RUN command.  (See
VERIFY.)

Execution mode:  Line

Examples 

The following are legal abbreviations which may be used with the RUN
command and its parameters:

RU FCOPYPUB.SYS                 Run the FCOPY utility.

RU $OLDPASS;LIB= G; DEBUG       Run the prepared program $OLDPASS; search
                                segmented procedure libraries beginning
                                with the group library to satisfy
                                external references during allocation;
                                issue a DEBUG call before the first
                                executable instruction of the program.

In the example the RUN command is used to run two prepared programs.
SIMCAL is to be used as the simple calculator it was designed to be, and
it must be compiled, prepared, and run.  Assume that SIMCAL was compiled
into a USL file named $OLDPASS with RISE's VERIFY RPG command.  Now it
must be prepared using the Segmenter (or, alternatively, with the VERIFY
PREP command).  Initially, the command to run the Segmenter subsystem is
given (1).  The HP banner is then brought to the screen (2).  The USL
file is identified (3), and then prepared in a new program file (4).  The
user then leaves the Segmenter subsystem with the EXIT command and RISE's
banner is displayed (5).

Next, the input and output file equations are given for SIMCAL. Note that
the user must supply the colon (:)  prompts (6).  Following that, the RUN
$OLDPASS executes SIMCAL (7).

Examples of SIMCAL's application follows:  it is used to add (8),
subtract (9), multiply (10), and divide (11).  The colon entered when the
calculations are finished returns the user to RISE (12).

     (1)  >RUN SEGDVR.PUB.SYS

     (2)  HP32050A.01.03 SEGMENTER (C) HEWLETT-PACKARD CO. 1979

     (3)  -USL $OLDPASS

     (4)  -PREP $NEWPASS

     (5)  -EXIT

          HP32104A.05.00 RPG INTERACTIVE SYSTEM ENVIRONMENT   RISE
          (C) HEWLETT-PACKARD CO. 1981      WED, SEP 16, 1981, 10:29 AM

     (6)  >:FILE INPUT=$STDIN
          >:FILE OUTPUT=$STDLIST

     (7)  >RUN $OLDPASS

              SIMPLE             CALCULATOR

           ENTER DATA IN THE FORMAT:
           C NNNDD NNNDD

     (8)   A 11100 11100

          ..... YOUR PROBLEM:  111.00 ADD   111.00 EQUALS      222.0000
           ENTER DATA IN THE FORMAT:
           C NNNDD NNNDD

     (9)   S 22222 11111

     ..... YOUR PROBLEM:  222.22   SUB  111.11 EQUALS    111.1100

           ENTER DATA IN THE FORMAT:
           C NNNDD NNNDD

     (10)  M 01000 01000

     ..... YOUR PROBLEM:   10.00  MULT   10.00 EQUALS    100.0000

           ENTER DATA IN THE FORMAT:
           C NNNDD NNNDD

     (11)  D 10010 01000

     ..... YOUR PROBLEM:  100.10 DIV     10.00 EQUALS     10.0100

           ENTER DATA IN THE FORMAT:
           C NNNDD NNNDD

     (12)  :

           HP32104A.05.00 RPG INTERACTIVE SYSTEM ENVIRONMENT   RISE
           (C) HEWLETT-PACKARD CO. 1981      WED, SEP 16, 1981, 10:29 AM

           >



MPE/iX 5.0 Documentation