Function
Section classification is achieved by a system of segment-numbers. The segment-number is included in the section heading.
Format
section-name SECTION [segment-number].
Syntax rules
Section-name identifies the section.
Segment-number indicates whether the chapter belongs to a permanent, overlayable fixed, or independent segment.
segment-number must be an unsigned integer ranging in value from 0 through 99.
All sections that have the same segment-number constitute a program segment with that number.
Segments with segment-numbers 0 through 49 belong to the fixed portion of the object program. The SEGMENT-LIMIT clause indicates which of these segments are treated as permanent and which as overlayable fixed segments.
Segments with segment-numbers 50 through 99 are independent segments.
If the segment-number is omitted from the section heading the segment number is assumed to be 0.
Sections in the DECLARATIVES subdivision of the Procedure Division must not contain segment-numbers in their section headings. They are treated as permanent segments whose segment-number is 0.
General rule
When a procedure-name in an independent segment is referred to by a PERFORM or GO TO statement contained in a segment with a different segment-number, the segment referred to is made available in its initial state for each execution of the PERFORM or GO TO statement. If the PERFORM statement is repeated, the initial state is restored only for the first execution of the PERFORM statement.