Interprogram Communication
12.2 COBOL Program Attributes
Example 12–3 Run Unit with Three Separately Compiled Programs, One with
Two Contained Programs
IDENTIFICATION DIVISION.
PROGRAM-ID.
MAIN-PROGRAM.
7
.
.
.
CALL SUB1.
CALL SUB2.
.
STOP RUN.
IDENTIFICATION DIVISION.
PROGRAM-ID.
SUB1.
8
.
.
.
CALL SUB3.
EXIT PROGRAM.
END PROGRAM SUB1.
IDENTIFICATION DIVISION.
PROGRAM-ID.
SUB2.
9
.
.
.
EXIT PROGRAM.
END PROGRAM
SUB2.
END PROGRAM MAIN-PROGRAM.
IDENTIFICATION DIVISION.
PROGRAM-ID.
SUB3.
1 0
.
.
.
CALL SUB4.
.
.
.
STOP RUN.
IDENTIFICATION DIVISION.
PROGRAM-ID.
SUB4.
1 1
.
.
.
EXIT PROGRAM.
12.2.1 The INITIAL Clause
A COBOL program with an INITIAL clause is returned to its initial state
whenever that program exits. This ensures that it will be in its initial state the
next time it is called.
During this initialization process, all internal program data whose description
contains a VALUE clause is initialized to that defined value. Any item whose
description does not include a VALUE clause will be initialized, and contain an
undefined value.
When an INITIAL clause is present and when the program is called, an implicit
CLOSE statement executes for all files in the open mode associated with internal
file connectors.
12–4 Interprogram Communication
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......