PREPRUN

Generated from C.65.00 /SYSADMIN/PUB/MYCICAT last modified on Sun Aug 29 15:08:37 2004

Back to Main Index


PREPRUN


     Prepares and executes a compiled Compatibility Mode program. (CM)

SYNTAX


     PREPRUN uslfile[,entrypoint]

        [;NOPRIV]                   [;RL=filename]
        [;PMAP]                     [;NOCB]
        [;DEBUG]                    [;INFO=quotedstring]
        [;LMAP]                              {*formaldesig}
                                    [;STDIN=[{fileref     }]
        [;MAXDATA=segsize]                   {$NULL       }
        [;PARM=parameternum]                 {*formaldesig}
                                    [;STDLIST=[{fileref     }]
        [;STACK=stacksize]                     {$NULL       }
        [;DL=dlsize]                [;PATCH=patchsize]
              {G}                   [;NOSYM]
        [;LIB={P}]
              {S}                   [{;FPMAP  }]
                                     {;NOFPMAP}
        [;CAP=capabilitylist]


PARAMETERS


uslfile             Actual file designator of the USL file to which the
                    program has been compiled.

entrypoint          Contains a character string, terminated by a blank,
                    specifying the entry point (label) in the program
                    where execution is to begin when the program is
                    executed.  The entrypoint parameter may be the
                    primary entry point or any secondary entry point in
                    the program's outer block.  Default is primary entry
                    point.

NOPRIV              Declaration that the program segments will be placed
                    in nonprivileged (user) mode.  This parameter is for
                    programs prepared with Privileged Mode capability
                    and make them accessible to nonprivileged users.
                    Normally, program segments containing privileged
                    instructions are executed in Privileged Mode only if
                    the program was prepared with Privileged Mode (PM)
                    capability class.  (A program containing legally
                    compiled privileged code, placed in nonprivileged
                    mode, may abort when an attempt is made to execute
                    it.)

                    If NOPRIV is specified, all segments are placed in
                    nonprivileged mode. (Library segments are not
                    affected because their mode is determined
                    independently.)  Default is that segments of a
                    Privileged Mode program will remain in Privileged
                    Mode.

PMAP                Request to produce a descriptive listing of the
                    prepared program to a file whose formal file
                    designator is $SEGLIST.  If $SEGLIST is not found in
                    a FILE command, the listing is produced on the
                    current list device.  Default is no listing.

DEBUG               Request to issue a DEBUG call before the first
                    executable instruction of the program.  Unless the
                    user has READ and EXECUTE access to the program
                    file, this parameter is ignored.  If Privileged Mode
                    (PM) capability has been assigned, the user is put
                    into Privileged Mode DEBUG.  If not, the user is put
                    into user mode DEBUG.  Default is that the DEBUG
                    call is not issued.

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

ZERODB              Request to initialize to zero the initially defined
                    user managed (DL-DB) area, and uninitialized
                    portions of the DB-Q (initial) area.  Default is
                    that these areas are not affected.

segsize             Maximum permitted stack area (Z-DL) in words.  This
                    parameter should be included when you expect that
                    the size of DL-DB or Z-DB areas will be changed
                    during program preparation or execution. Regardless
                    what you specify, MPE/iX may change the segsize to
                    accommodate table overflow conditions.

                    If you prepare your program with a segsize less than
                    the configured minimum, the value is rounded up to
                    the minimum or the amount needed by the program (as
                    calculated by the MPE Segmenter).  The maximum
                    actual segsize permitted a program is 31,232 words.
                    You may prepare your program with a segsize larger
                    than necessary so long as this maximum is not
                    exceeded.  If the specified segsize does exceed the
                    maximum, it will be rounded down to 31,232 words.

parameternum        An integer containing a parameter to be passed to
                    the new program (accessed through Q-4 of the outer
                    block).

stacksize           Size of local data area, Z-Q (initial), in the
                    stack, in words.  If it is specified, this value
                    must be between 511 and 32,767 words.  The default
                    is estimated by the MPE Segmenter.

dlsize              DL-DB area to be initially assigned to stack.  Due
                    to system logging considerations, the DL-DB area is
                    always rounded upward, so that the distance from the
                    beginning of the stack data segment to the DB-
                    address is a multiple of 128 words.  The value you
                    specify must be between -1 and 32,767 words. The
                    default is estimated by the MPE V/E Segmenter.

G, P, or S          Searches the segmented procedure libraries of the
                    program file's group and account.  The G option
                    searches the group library, account library, then
                    the system library.  The P option searches the
                    account library then system library. The S option
                    searches the system library for external references
                    to segmented procedures.  Default is S.

capabilitylist      Capability class attributes associated with the
                    program, specified in two-character mnemonics.  If
                    more than one mnemonic is specified, each must be
                    separated from its neighbor by a comma. The
                    mnemonics are

                    IA   Interactive Access
                    BA   Local Batch Access
                    PH   Process Handling
                    DS   Data Segment Management
                    MR   Multiple Resource Management
                    PM   Privileged Mode

                    You can specify only those attributes that you
                    possess through assignment by the account manager or
                    the system manager.  Default is IA and BA.

filename            Actual file designator of the relocatable library
                    (RL) file to be searched to satisfy external
                    references during preparation of the program.  This
                    can be any permanent file of type RL, to which you
                    must have READ and LOCK access.  It need not belong
                    to the logon group, nor does it require a reserved,
                    local name.  This file yields a single segment that
                    is incorporated into the segments of the program
                    file.  Refer to the MPE Segmenter Reference Manual
                    (32650-60026) for a description of RL files.
                    Default is that no library is searched.

NOCB                Request that the file system not use stack segment
                    (PCBX) for its control blocks, even if sufficient
                    space is available.  This permits you to expand your
                    stack (with the DLSIZE or ZSIZE intrinsics) to the
                    maximum possible limit at a later time.  It will,
                    however, cause the File Management System to operate
                    more slowly for this program.

quotedstring        A sequence of characters between two single
                    quotation marks (apostrophes) or two double
                    quotation marks.  You may use the delimiting
                    character as part of the string so long as the
                    delimiter appears twice.  Any occurrence of two
                    single quotes, or two double quotes in a row, is
                    considered part of the string, and, therefore, not
                    the terminating delimiter.

                    ;INFO=quotedstring is used in some programming
                    languages (for example, COBOLII, Pascal) to pass
                    compiler options to a program.  These options will
                    appear before the first line of source code in the
                    text file.

$STDIN              This parameter allows the user to specify the file
                    to be used as $STDIN by the program being executed.
                    If omitted, or if nothing is specified after the
                    equal sign, such as ;$STDIN=, then $STDIN defaults
                    to the job or session's standard input device. You
                    may use one of the following subparameters with
                    $STDIN=

                    *formaldesig  The formal file designator for a
                                  file previously specified in a file
                                  equation.

                    fileref       The name of an existing permanent disk
                                  file.

                    $NULL         The actual file designator of a
                                  system-defined file that is always
                                  treated as an empty file.

                                  When referenced by a program as
                                  $STDIN, that program receives only an
                                  end-of-file indication when accessed.
                                  When referenced by a program as
                                  $STDLIST, the associated write request
                                  is accepted by MPE/iX, but no physical
                                  output is actually performed.  Thus,
                                  $NULL can be used to discard unneeded
                                  output from an executing program.

STDLIST             This parameter allows the user to specify the file
                    to be used as $STDLIST by the program being
                    executed.  If $STDLIST is omitted, or if nothing is
                    specified after the equal sign, such as ;$STDLIST=,
                    then $STDLIST defaults to the job or session's
                    standard list device.  This parameter has the same
                    subparameters as $STDIN, but you may also specify
                    the keyword NEW.

NEW                 The name to be assigned to a job/session temporary
                    disk file created with the system defaults.  The
                    system defaults of the new file are fixed length
                    ASCII 132-byte records with a maximum file size of
                    1023 records.

patchsize           Specifies the size of the patch area.  This size
                    will apply to all segments within the program file.
                    The value you specify must be within -1 and 16,380
                    words.

NOSYM               Suppresses the symbolic DEBUG option. Refer to the
                    HPToolset/V Reference Manual (32350-90001) for more
                    information.

FPMAP or NOFPMAP    Includes or excludes the internal PMAP information.
                    FPMAP is a request to have internal PMAP information
                    included in the program.  NOFPMAP excludes PMAP
                    information from the program when the system FPMAP
                    or job/session FPMAP is on. If the symbolic DEBUG
                    option is invoked, default is FPMAP.  Otherwise the
                    default is NOFPMAP.


OPERATION


     The PREPRUN command prepares and executes a program compiled in
     a USL file.  Both relocatable (RL) and segmented (SL) libraries
     are searched during the preparation process to satisfy external
     references.

     The USL file created during compilation is a system-defined
     temporary file, $OLDPASS, which is passed directly to the MPE
     Segmenter.  It can be accessed only if you do not use the default
     for progfile.  This is because the Segmenter also uses the file
     $OLDPASS to store the prepared program segments, overwriting any
     existing temporary file of the same 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 prepare and execute a program from the USL file XUSL,
     with no special parameters declared, enter

     PREPRUN XUSL

     To obtain a descriptive listing of the prepared program, and
     a listing of the allocated (loaded) program, enter

     PREPRUN XUSL;PMAP;LMAP

     To prepare and execute a program form the USL file UBASE
     that begins execution at the entry point RESTART, that has a
     stacksize of 800 words and searches an RL file named LIBA,
     enter

     PREPRUN UBASE,RESTART;STACK=800;RL=LIBA

     The following example prepares and runs a program with
     $STDIN set to the existing disk file INPUT.  $STDLIST is set
     to the line printer

     FILE LPFILE;DEV=LP
     PREPRUN TESTPROG;MAXDATA=10000;$STDIN=INPUT;&
     $STDLIST=*LPFILE

     The next example also uses the $STDIN= and $STDLIST=
     parameters to prepare and run a program.  This time, a file
     equation is used to set $STDIN to INPT, and to set $STDLIST
     to the temporary disk file RESULTS (which is automatically
     created by the RUN command).

     FILE INFILE=INPT,OLD;
     PREPRUN TESTPROG;DEBUG;$STDIN=*INFILE;$STDLIST=RESULTS,NEW

     The following example of the PREPRUN command uses the INFO=
     parameter to pass a string to the program

     PREPRUN MYPROG;MAXDATA=2000;INFO="A test with ""and"" &
     characters"

     Note that the delimiting character is doubled within the
     string so that it will appear on the printout as follows

     A test with "and" characters

ADDITIONAL INFORMATION


Commands:   PREP

Manuals :   MPE Segmenter Reference Manual (32650-60026)

Back to Main Index