HP 3000 Manuals

:PREP [ MPE Segmenter Reference Manual ] MPE/iX 5.0 Documentation


MPE Segmenter Reference Manual

:PREP 

Prepares program from a User Subprogram Library (USL) file onto a program
file.  Implicitly calls the Segmenter.

SYNTAX 

     :PREP uslfile,progfile 
        [;ZERODB]
        [;PMAP]
        [;MAXDATA=segsize  [;PATCH=patchsize ]
        [;STACK=stacksize]

        [;DL=dlsize]  [{;FPMAP   } ]
                      {;NOFMPMAP}
        [;CAP=caplist]
        [;RL=filename]
        [;NOSYM]

PARAMETERS 

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

progfile         Actual designator of program file into which prepared
                 program segments are written.  Can be any binary output
                 file.  This program file must be created in one of two
                 ways:

                    1.  By creating a new file with the MPE :BUILD
                        command with a filecode of PROG or 1029, and a
                        numextents parameter value of 1.

                    2.  By specifying a non-existent file in the progfile 
                        parameter, in which case a file of the correct
                        size and type is created.  This file is a job
                        temporary file.

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

PMAP             Request to produce a descriptive listing of the prepared
                 program on file whose formal designator is SEGLIST. If
                 no :FILE equation is found referencing SEGLIST, listing
                 is produced on $STDLIST. Default is no listing.  See
                 Appendix G for a listing of a prepared program.

segsize          Maximum stack area (Z-DL) size permitted, in words.
                 This parameter is included when it is expected that the
                 size of DL-DB or Z-DB areas will be changed during
                 program execution.  Default is that MPE assumes that
                 these areas will not change.  Regardless what you
                 specify, MPE may change the segsized to accommodate
                 table overflow conditions.

                 If you prepare your program with 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 Segmenter).  The maximum actual
                 segsize permitted a program is 32,767 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 32,767 words.

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.

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

dlsize           DL-DB area to be initially assigned to stack.  This area
                 is of interest mainly in programmatic applications.  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
                 within -1 and 32,767 words.  The default is estimated by
                 the MPE Segmenter.

FPMAP or         Includes or excludes the internal PMAP information.
NOFPMAP          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 FFPMAP is on.  If the symbolic debug option
                 is invoked, default is FPMAP. Otherwise the default is
                 NOFPMAP.

caplist          Capability-class attributes associated with program,
                 specified as 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

                 Note that you can specify only those capabilities that
                 you possess (through assignment by the Account Manager
                 or System Manager).  Default is IA, BA (if you possess
                 these capabilities).

filename         Actual designator of RL file to be searched to satisfy
                 external references during preparation.  This can be any
                 permanent binary file of type RL. It need not belong to
                 log-on group, nor have a reserved, local name.  This
                 file, to which you must have READ and LOCK access,
                 yields a single segment that is incorporated into the
                 segments of the program file.  See Section II for a
                 discussion of RL files.

                 Default is that no library is searched.

NOSYM            Suppresses the symbolic debug option.  Refer to the
                 Toolset Reference Manual (32350-90001).

USE 

-----------------------------------------------------------------------------------------------
|                       |                            |                                        |
| Availabl              | In Session?                | YES                                    |
|                       |                            |                                        |
-----------------------------------------------------------------------------------------------
|                       |                            |                                        |
|                       | In Job?                    | YES                                    |
|                       |                            |                                        |
-----------------------------------------------------------------------------------------------
|                       |                            |                                        |
|                       | In Break?                  | NO                                     |
|                       |                            |                                        |
-----------------------------------------------------------------------------------------------
|                       |                            |                                        |
|                       | Programmatically?          | NO                                     |
|                       |                            |                                        |
-----------------------------------------------------------------------------------------------
|                                                    |                                        |
| Breakable?                                         | YES (Suspends)                         |
|                                                    |                                        |
-----------------------------------------------------------------------------------------------

OPERATION 

The :PREP command prepares a compiled source program for execution.
Unless you prepare the program onto a previously created program file,
this command will create a program file of the appropriate format for you
in the job/session temporary file domain.  In fact, it is recommended
that you specify a non-existent program file in the :PREP command.  This
allows MPE to create a file of optimum size and characteristics.  (See
Example below.)

A compiled program is prepared by searching a relocatable library (RL)
file to satisfy references to external procedures required by the
program.  When the program is prepared, such procedures are linked to the
program in the resulting program file.  To use an RL file via the :PREP
command, the user requires READ and LOCK capability.

EXAMPLE 

To prepare a program from the USL file USLX to the new program file
PROGX, enter:

:PREP USLX,PROGX          Prepares program into program file PROGX.

:SAVE PROGX               Saves program file.

You can create a program file in the permanent file domain by using the
:BUILD command.  When you do this, you must be sure to specify a filecode 
of PROG (or 1029) for this file, and to limit the file to one extent
(program files are not allowed to span more than one extent).  The
following :BUILD command creates such a file, which is then used by the
:PREP command:

     :BUILD PFILE;CODE=PROG;DISC=,1
     :PREP UFILE,PFILE

To prepare a program from the USL file named UFILE and store it in a
program file named PROGFILE, list the prepared program, assign a
stacksize of 511 words, and assign batch-access capability only for the
program, enter:

     :PREP USEFILE,PROGFILE;PMAP;STACK=511;CAP=BA

ADDITIONAL DISCUSSION 

MPE Commands V Reference Manual (32033-90006).

Using Files (30000-90102).

MPE File System Reference Manual (30000-90236).



MPE/iX 5.0 Documentation