Technical data
Figure 1–1 (Cont.) Structure of a COBOL Program
DATA DIVISION.
SUBSCHEMA SECTION.
subschema entries and keeplist entries
FILE SECTION.
file and record description entries
report file description entries
sort-merge file and record description entries
WORKING-STORAGE SECTION.
record description entries
LINKAGE SECTION.
record description entries
REPORT SECTION.
report and report group description entries.
SCREEN SECTION. (Alpha, I64)
screen description entries (Alpha, I64)
PROCEDURE DIVISION.
DECLARATIVES.
sections
paragraphs
sentences
END DECLARATIVES.
.
.
.
sections
paragraphs
sentences
.
.
.
END PROGRAM header
The Data Division can contain a special SUB-SCHEMA SECTION section header
for the Oracle CODASYL DBMS program, as shown in Figure 1–1.
A Data Division entry begins with a level indicator or level-number and is
followed, in order, by:
1. A space
2. The name of a data item or file connector
3. A sequence of independent descriptive clauses
4. A separator period
The COBOL level indicators are as follows:
• DB (for subschema entries)
• LD (for keeplist entries)
• FD (for file description entries)
• SD (for sort-merge file description entries)
• RD (for report file description entries)
The first two level indicators in this list, DB and LD, are used in Oracle
CODASYL DBMS database programs. FD, SD, and RD can be in database
programs as well as in other programs.
Level indicators start in Area A.
1–2 Program Organization and Structure