HP 3000 Manuals

Compiling and Executing Transact/iX Programs [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation


HP Transact Reference Manual

Compiling and Executing Transact/iX Programs 

The following MPE/iX commands are used to compile and execute Transact/iX
programs:

RUN TRAN.PUB.SYS       Performs the same function as TRANXL but allows
                       complete user control over all optional features.

TRANXL                 Uses either an ASCII source file or p-code as
                       input; produces an intermediate binary RSOM file.

TRANXLLK               Combines the functions of TRANXL and LINK.

TRANXLGO               Combines the functions of TRANXL, LINK, and RUN.

LINK                   Uses an intermediate RSOM file; produces a linked
                       program file.

LINKEDIT               Adds procedures to the RSOM file and produces a
                       linked program file.

RUN progname           Executes the program.

These commands are described on the following pages, in the order shown
above.

RUN TRAN.PUB.SYS 

Invokes the Transact/iX compiler and produces an RSOM file.
_____________________________________________________
|                                                   |
|                                                   |
|     RUN TRAN.PUB.SYS [;PARM=parmnum][;INFO="text"]|
_____________________________________________________

            

For complete syntax of the RUN command, see the MPE/iX Commands Reference 
Manual.

The Transact/iX compiler is a program file called TRAN.PUB.SYS. You can
therefore use the MPE/iX command RUN to invoke it and compile your
program.

When you compile with the RUN command, The default source, object, and
listing files for the compiler are $STDIN, $NEWPASS, and $STDLIST,
respectively.  To override these default values, you must perform two
steps:

   1.  Equate the non-default file with its formal designator using an
       MPE/iX FILE command;

   2.  Select an appropriate value for the PARM parameter of the RUN
       command.  This value indicates which files are not defaulted.

The compiler recognizes these formal file designators:

Formal Designator  File Usage 

   TRANTEXT        Source file

   TRANOBJ         Object file (RSOM)

   TRANLIST        Listing file

The PARM parameter of the RUN command indicates which files appeared in
the file equation.  The compiler opens these files instead of the default
files.  The PARM parameter accepts an integer value in the range 0...7.
The integer value have the following meanings:

   Value           Files Present in FILE Commands 

     0       none

     1       source

     2       listing

     3       listing, source

     4       object

     5       object, source

     6       object, listing

     7       object, listing, source

An error occurs if the PARM value indicates a file for which no file
equation exists.  On the other hand, if a file equation exists and the
PARM value doesn't indicate that file, the compiler will use the default
file.

The RUN command also has an optional INFO parameter.  The INFO string
consists of compiler options for the Transact/iX compiler.  Valid
compiler options are described earlier in this chapter.  The options can
be arranged in any order.

TRANTEXT can be either an ASCII source file or a p-code file.  When
TRANTEXT contains ASCII text, TRANCOMP is called to create p-code from
the source file, then it compiles the p-code.

The default size of the RSOM file is 4,000 records.  For very large
Transact programs, you should increase the default with an MPE/iX FILE
command before compiling the program.  For example, the following command
increases the size of the RSOM file to 15,000 records:

     :FILE TRANOBJ=MYSOM;DISC=15000 

If the RSOM file size is not large enough, the following error is
displayed:

     *ERROR: error in writing to output file. (7204)

TRANXL 

Invokes the Transact/iX compiler and produces an RSOM file.
___________________________________________________________________
|                                                                 |
|                                                                 |
|     TRANXL [textfile] [,[rlfile] [,[listfile]]] [;INFO = "text"]|
___________________________________________________________________

            

The command TRANXL invokes the Transact/iX compiler and causes it to
process the specified source file and generate object code to a binary
file.  All of the parameters of the TRANXL command are optional; their
default values are given below.  If you do not include an optional
parameter, its default value is used automatically.  TRANXL does not
prompt for missing parameters.

Statement Parts.   

textfile              The name of the input file read by the Transact/iX
                      compiler.  This can be any p-code or ASCII file.
                      If this parameter is omitted, the file $STDIN, the
                      current input device, is the default file.  In a
                      session, this is the terminal and you can enter
                      source code interactively.  To signal the end of
                      source code, enter a colon (:)  as the first
                      character on a new line.

rlfile                The name of the relocatable SOM (RSOM) file on
                      which the compiler writes the object code.  If this
                      parameter is omitted, the file $NEWPASS is the
                      default file.

listfile              The name of the file on which the compiler writes
                      the program listing.  This can be any ASCII file.
                      If this parameter is omitted, the system assigns
                      the file $STDLIST as the default file.  Typically,
                      this is the terminal in a session or the printer in
                      a batch job.  If the listfile is $STDLIST, the
                      listing is echoed back to the terminal.  If the
                      list file is $NULL or a file other than $STDLIST,
                      the compiler displays lines with errors on $STDLIST
                      as well as in the list file.  If textfile is
                      p-code, listfile contains only error messages.

text                  The text string consists of compiler options for
                      the Transact/iX compiler.  Valid compiler options
                      are described earlier in this chapter.  The options
                      can be arranged in any order.

The default size of the RSOM file is 4,000 records.  For very large
Transact programs, you should increase the default with an MPE/iX BUILD
command before compiling the program.  For example, the following command
increases the size of the RSOM file to 15,000 records.

     :BUILD MYSOM;DISC=15000;CODE=NMOBJ 

If the RSOM file size is not large enough, the following error is
displayed:

     *ERROR: error in writing to output file. (7204)

TRANXLLK 

Compiles and links a source file into an executable program file.
_________________________________________________________________________
|                                                                       |
|                                                                       |
|       TRANXLLK [textfile ][,[progfile] [,[listfile]]] [;INFO = "text"]|
_________________________________________________________________________

            

The command file TRANXLLK compiles a Transact or p-code program into an
RSOM file and then links that file into a program file.  All of the
parameters of the TRANXLLK command are optional; the default values are
given below.

Statement Parts.   

textfile              The name of the input file that the Transact/iX
                      compiler reads.  This can be any p-code or ASCII
                      file.  If this parameter is omitted, the file
                      $STDIN, the current input device, is the default
                      file.  In a session, this is the terminal and you
                      can enter source code interactively.  To signal the
                      end of source code, enter a colon (:)  as the first
                      character on a new line.

progfile              The name of the program file on which the linker
                      writes the linked program.  If this parameter is
                      omitted, the file $NEWPASS is the default file.

listfile              The name of the file on which the compiler writes
                      the program listing.  This can be any ASCII file.
                      If this parameter is omitted, the system assigns
                      the file $STDLIST as the default file.  Typically,
                      this is the terminal in a session or the printer in
                      a batch job.  If the listfile is $STDLIST, the
                      listing is echoed back to the terminal.  If the
                      list file is $NULL or a file other than $STDLIST,
                      the compiler displays lines with errors on $STDLIST
                      as well as in the list file.

text                  The text string consists of compiler options for
                      the Transact/iX compiler.  Valid compiler options
                      are described earlier in this chapter.  The options
                      can be arranged in any order.

The default size of the intermediate RSOM file, which is created by the
Transact/iX compiler, is 4,000 records.  This file size can not be
altered when using the TRANXLLK command.  You must use TRANXL or run
TRAN.PUB.SYS in these cases.

TRANXLGO 

Compiles, links, and executes a source file.
____________________________________________________________
|                                                          |
|                                                          |
|        TRANXLGO [textfile] [,[listfile]] [;INFO = "text"]|
____________________________________________________________

            

The command file TRANXLGO compiles, links, and executes a Transact or
p-code program.  All of the parameters of the TRANXLGO command are
optional; the default values are given below.  After successful
completion of TRANXLGO, the program file is in the temporary file
$OLDPASS that you can save using the MPE/iX SAVE command.

Statement Parts.   

textfile              The name of the input file that the Transact/iX
                      compiler reads.  This can be any p-code or ASCII
                      file.  If this parameter is omitted, the file
                      $STDIN, the current input device, is the default
                      file.  In a session, this is the terminal and you
                      can enter source code interactively.  To signal the
                      end of source code, enter a colon (:)  as the first
                      character on a new line.

listfile              The name of the file on which the compiler writes
                      the program listing.  This can be any ASCII file.
                      If this parameter is omitted, the system assigns
                      the file $STDLIST as the default file.  Typically,
                      this is the terminal in a session or the printer in
                      a batch job.  If the listfile is $STDLIST, the
                      listing is echoed back to the terminal.  If the
                      list file is $NULL or a file other than $STDLIST,
                      the compiler displays lines with errors on $STDLIST
                      as well as in the list file.

text                  The text string consists of compiler options for
                      the Transact/iX compiler.  Valid compiler options
                      are described earlier in this chapter.  The options
                      can be arranged in any order.

The default size of the intermediate RSOM file, which is created by the
Transact/iX compiler, is 4,000 records.  This file size can not be
altered when using the TRANXLLK command.  You must use TRANXL or run
TRAN.PUB.SYS in these cases.

LINK 

Creates an executable program file.
_________________________________________________
|                                               |
|                                               |
|     LINK [FROM=file [,file]...] [;TO=destfile]|
|          [;RL=rlfile]                         |
|          [;XL=xlfile]                         |
|          [;CAP=caplist]                       |
|          [;STACK=maxstacksize]                |
|          [;HEAP=maxheapsize]                  |
|          [;UNSAT=unsatname]                   |
|          [;PARMCHECK=integer]                 |
|          [;PRIVLEV=integer]                   |
|          [;XLEAST=integer]                    |
|          [;ENTRY=entryname]                   |
|          [;NODEBUG]                           |
|          [;NOSYM]                             |
|          [;MAP]                               |
|          [;SHOW]                              |
_________________________________________________

            

For input, the LINK command uses the RSOM file(s) produced by the
Transact/iX compiler.  It prepares this binary code for execution by
binding procedures together and defining the requirements for the data
area.

If the program is going to be accessing a subprogram in an RL, use the RL
option to name the library that contains the subprogram.

For complete documentation of the LINK command and all its parameters,
see the MPE/iX Commands Reference Manual.

LINKEDIT 

Accesses the Link Editor subsystem, where you can create program
libraries and add routines to them.
_____________________________________
|                                   |
|                                   |
|     LINKEDIT                      |
|                                   |
_____________________________________

            

When you compile and execute Transact/iX programs, the Link Editor is
used to build subprograms and to add them to either an XL or RL. The Link
Editor commands that are most likely to be used are

     BUILDRL
     BUILDXL
     ADDRL
     ADDXL

For a complete description of all Link Editor commands, see the Link 
Editor XL Reference Manual.

RUN progname 

Executes the program file produced by the MPE/iX linker.
____________________________________________________
|                                                  |
|                                                  |
|      RUN progname; [XL = "xlname[, xlname, ...]"]|
____________________________________________________

            

The MPE/iX RUN command executes the linked program file produced by the
linker.  Any external procedures referenced and stored in an executable
library are bound to the program at this time.

If subprograms are stored in an XL, use the XL= option to reference the
library that contains the subprograms.

For complete syntax and details, see the MPE/iX Commands Reference 
Manual.



MPE/iX 5.0 Documentation