HP 3000 Manuals

Compiling Your Program With the RUN Command [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation


HP COBOL II/XL Reference Manual

Compiling Your Program With the RUN Command 

The MPE XL RUN command runs the HP COBOL II compiler, which compiles your
source program.  You can invoke the HP COBOL II compiler and compile your
HP COBOL II program with either the RUN command or a command file.

Syntax 

RUN {COBOL  }.PUB.SYS [,{ANSI85}];PARM=parm;INFO=info 
    {COBOLII}         [ {ANSI74}]

Parameters 

COBOL         The compiler is invoked in Native Mode and generates object
              code especially designed for the MPE XL operating system.
              The default entry point is ANSI85.

COBOLII       The compiler is invoked in Compatibility Mode and generates
              object code especially designed for the MPE V operating
              system.  The code runs on the MPE XL operating system, but
              not as efficiently as Native Mode code[REV BEG] does.  The
              default entry point is ANSI74.[REV END]

ANSI85        The compiler is invoked through its ANSI85 entry point and
              conforms to the COBOL'85 standard.

ANSI74        The compiler is invoked through its ANSI74 entry point and
              conforms to the COBOL'74 standard.

parm          Tells the RUN command which of the following files have
              been redefined by FILE commands and are not to be
              defaulted.  See Table H-3  for the values parm can have
              and what they mean.

              newfile       MPE file into which the merged textfile and
                            masterfile is written.  The formal designator
                            is COBNEW. If newfile is omitted, no new file
                            is written.

              masterfile    MPE or TSAM file to be merged with textfile 
                            to produce a composite source program.  The
                            formal designator is COBMAST. If masterfile 
                            is omitted, the entire source is from
                            textfile.

              objectfile    Relocatable object code file (Native Mode
                            only).  The formal designator is COBOBJ. The
                            default is $NEWPASS or $OLDPASS.

              uslfile       Relocatable object code file (Compatibility
                            Mode only).  The formal designator is COBUSL.
                            The default is $NEWPASS or $OLDPASS.

              listfile      MPE file into which the source listing and
                            errors are written.  The formal designator is
                            COBLIST. The default is $STDLIST.

              textfile      MPE or TSAM file containing your source
                            program.  The formal designator is COBTEXT.
                            The default is $STDIN.

info          A string whose value is a command list of the form:

                   "$compiler_command[$compiler_command]..."

              where no compiler_command contains the character $ (even if
              it is within quotes).  Refer to Appendix B  for more
              information on compiler commands.

              If the number of commands is long enough, you can use an
              ampersand (&) to continue the info string.  The length
              limit for a compiler command is the same as the length
              limit for a source program line.

              In the listing file, the string "INFO=" appears where the
              sequence numbers normally appear.

              The info string is processed before any source, including
              compiler commands in the source.  Therefore, you may not
              want to use the default settings of these commands in the
              source file.  You should only include commands such as
              SUBPROGRAM, which are required for proper compilation, in
              the source file.  This allows you to specify commands like
              NOLIST, MAP, BOUNDS, or CROSSREF uniquely within the info 
              string for each compilation.

          Table H-3.  PARM Values and Their Meanings 

-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|  PARM Value  |   newfile    |    masterfile     |    objectfile     |   listfile   |   textfile   |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      0       |              |                   |                   |              |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      1       |              |                   |                   |              |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      2       |              |                   |                   |      x       |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      3       |              |                   |                   |      x       |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      4       |              |                   |         x         |              |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      5       |              |                   |         x         |              |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      6       |              |                   |         x         |      x       |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      7       |              |                   |         x         |      x       |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      8       |              |         x         |                   |              |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      9       |              |         x         |                   |              |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      10      |              |         x         |                   |      x       |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      11      |              |         x         |                   |      x       |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      12      |              |         x         |         x         |              |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      13      |              |         x         |         x         |              |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      14      |              |         x         |         x         |      x       |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      15      |              |         x         |         x         |      x       |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------

NOTE: x means "Do not use the default for this file."

          Table H-4.  PARM Values and Their Meanings 

-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|  PARM Value  |   newfile    |    masterfile     |    objectfile     |   listfile   |   textfile   |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      16      |      x       |                   |                   |              |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      17      |      x       |                   |                   |              |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      18      |      x       |                   |                   |      x       |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      19      |      x       |                   |                   |      x       |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      20      |      x       |                   |         x         |              |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      21      |      x       |                   |         x         |              |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      22      |      x       |                   |         x         |      x       |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      23      |      x       |                   |         x         |      x       |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      24      |      x       |         x         |                   |              |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      25      |      x       |         x         |                   |              |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      26      |      x       |         x         |                   |      x       |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      27      |      x       |         x         |                   |      x       |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      28      |      x       |         x         |         x         |              |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      29      |      x       |         x         |         x         |              |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      30      |      x       |         x         |         x         |      x       |              |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------
|              |              |                   |                   |              |              |
|      31      |      x       |         x         |         x         |      x       |      x       |
|              |              |                   |                   |              |              |
-----------------------------------------------------------------------------------------------------

NOTE: x means "Do not use the default for this file."

The following is an example of a command file.  It can be used as a
template to create a command file that merges master and text files to
create new files.  Given the file named COMPCOB with the following
contents:

     PARM text=$stdin,obj=$newpass,list=$stdlist,mast=$null,new=$null,INFO=""
     FILE COBTEXT=!TEXT
     FILE COBOBJ=!OBJ
     FILE COBLIST=!LIST
     FILE COBMAST=!MAST
     FILE COBNEW=!NEW
     RUN COBOL.PUB.SYS,ANSI85;PARM=31;INFO="!INFO"

You can invoke the command file as follows:

     :COMPCOB PRGCHNGS,,,PRGMAST,PRGNEW



MPE/iX 5.0 Documentation