VMS Help
COBOL, PROCEDURE_DIVISION, miscellaneous_topics, segmentation
*Conan The Librarian
|
HP COBOL programs execute in a virtual memory environment. Therefore,
programs need not manage physical memory by overlaying Procedure
Division code.
In HP COBOL, segmentation controls the assignment of Procedure
Division sections to fixed or independent segments. The optional
segment-number in the section header specifies the type of segment.
Format -
section-name SECTION [ segment-number ] .
names a Procedure Division section.
must be an integer in the range 0 through 99. If there is no
segment-number in a section header, the implied segment-number is 0.
Fixed segments appear to reside in memory at all times. A fixed
segment is in its initial state the first time the program calls it.
On later calls, the fixed segment is in its last-used state.
The state of an independent segment depends on how and when it
receives control.