HP 3000 Manuals

Control File [ HP COBOL II/XL Programmer's Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Programmer's Guide

Control File 

When you compile your COBOL program, the compiler includes the control
file at the beginning of your source file.  The default control file is
COBCNTL.PUB.SYS. It contains only comments, but you can add control
options to it.

If a file equation that names COBCNTL.PUB.SYS as a formal file designator
is in effect when you run the HP COBOL II/XL compiler, the compiler uses
that file equation to find the control file to include in your program.

Example 

If the following file equation is in effect when you run the HP COBOL
II/XL compiler, the compiler uses the file MYFILE.MYGROUP as the control
file instead of COBCNTL.PUB.SYS:

     :FILE COBCNTL.PUB.SYS=MYFILE.MYGROUP

If the compiler cannot open COBCNTL.PUB.SYS or the file that you
substituted for it, it issues a warning.

To change the defaults in COBCNTL.PUB.SYS permanently, ask your system
manager to change COBCNTL.PUB.SYS. To change them temporarily, use a file
equation to redirect COBCNTL.PUB.SYS to another file.  The other file
must be in standard COBOL format and must contain only preprocessor
commands and control options.

Standard COBOL format follows these rules:

Columns               Contains                                                                                                       

1-6                   Sequence number.

7                     One of the following characters:

                      Character             Means That the Line Contains                                                             
                      _ (Blank)             COBOL source code
                      - (hyphen)            Continuation line of COBOL
                                            source code.
                      D                     Debug line.
                      *                     Comment.
                      /                     Comment with page eject.
                      $                     Preprocessor command.

8-11                  Area A.

12-72                 Area B.

73-80                 Your own identification field, often the program or
                      source file name.  It can be anything, because the
                      compiler copies it to the list file and ignores
                      it.[REV BEG] However, for a COBOL copy library, it
                      must be used as text-name.[REV END]
[REV BEG]

Both the HP COBOL II/XL and HP COBOL II/V compilers use the same default
control file (COBCNTL.PUB.SYS). Because some control options are not
valid for both compilers, you can create a different control file for use
with one of the compilers and issue a file equation to use the second
control file, as described in the previous example.[REV END]



MPE/iX 5.0 Documentation