Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-2
Declarative Procedures
immediately preceding sentence, unless the immediately preceding sentence is a GO TO 
statement. When control reaches the end of a paragraph, control passes to the first 
section of the following paragraph. The only exception is when control reaches the end 
of a paragraph and that paragraph is the last in the range of a currently active 
PERFORM operation.
An example of Procedure Division structure is:
PROCEDURE DIVISION.
initialization SECTION.
get-started.
 sentence
 statement
 statement.
 sentence
 statement
 :
finish-up-init.
 sentence
 :
main-processing SECTION.
begin-it.
 sentence
 :
process-input-data.
 :
end-of-job.
 EXIT PROGRAM.
Declarative Procedures
A special portion of the Procedure Division is reserved for declarative procedures. 
These procedures are screen recovery routines specified by USE statements. When 
used, this portion must be coded immediately after the Procedure Division header. The 
portion begins with keyword DECLARATIVES and ends with keywords 
END DECLARATIVES. The following example illustrates a declarative procedure:
PROCEDURE DIVISION.
DECLARATIVES.
RECOV-SECT-1 SECTION.
 USE FOR RECOVERY ...
 :
END DECLARATIVES.
MAIN SECTION.
begin-my-program.
 :
Sections
A section, which is optional, is used to group related paragraphs for processing steps. 
Reference to a section name in a PERFORM statement, for example, includes all 
paragraphs in that section in the range of the PERFORM.










