Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-1
6 Procedure Division
The Procedure Division includes all of the processing steps for the program. The steps
are organized into SCREEN COBOL statements and sentences, and grouped into
paragraphs, procedures, and sections.
The format of the Procedure Division is:
Division Structure
The division begins with a division header. The format of the header is:
The header must be terminated with a period separator.
The USING phrase is applicable only in a subprogram that is to run under control of a
CALL statement that also contains a USING phrase. The identifiers in the USING
phrase must correspond in structure to the identifiers specified in the USING phrase of
the CALL statement. The number of identifiers should also correspond; however, an
error indication is given by the TCP only when the number of identifiers in the USING
phrase exceeds the number of identifiers specified in the USING phrase of the CALL
statement.
Execution begins with the first executable statement after the Procedure Division
header, excluding any declarative procedures, and continues on in logical order. The
Procedure Division header must be immediately followed by the DECLARATIVES
keyword and declarative procedures, or immediately followed by a paragraph or
section name.
During execution, control is transferred to a paragraph only at the beginning of the
paragraph. Control is passed to a sentence within a paragraph only from the
PROCEDURE DIVISION [ USING
data-name
[,
data-name
]...] .
[ DECLARATIVES.
{ [
section-name
SECTION . ]
[
paragraph-name
. [
sentence
] ... ] ... } ...
{
paragraph-name
. [
sentence
] ... } ...
END DECLARATIVES. ]
{ [
section-name
SECTION . ]
[
paragraph-name
. [
sentence
] ... ] ... } ...
{
paragraph-name
. [
sentence
] ... } ...
PROCEDURE DIVISION [ USING
data-name
[,
data-name
]...] .