PROCEDURE DIVISION Format [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
PROCEDURE DIVISION Format
The body of the PROCEDURE DIVISION has two general formats:
The first format of the PROCEDURE DIVISION body can be used when you wish
to use no section names in your program. In such a case, only paragraph
names are used to define procedures. This is generally not the best way
to write a COBOL program, since it does not allow for USE procedures or
segmentation of the object program. It may be beneficial, however, if
you are writing a very short, simple program.
The second format of the PROCEDURE DIVISION body is used when you wish to
allow for segmentation of your program or define declarative procedures.
In the second format, section names may be used to define procedures,
with paragraph names being used as subsections. If any part of the
PROCEDURE DIVISION is written using a section name, the entire PROCEDURE
DIVISION must be written using section names. Therefore, if a section
name is used, either the entire PROCEDURE DIVISION is a single section or
the PROCEDURE DIVISION consists of several sections.
MPE/iX 5.0 Documentation