Data Division in COBOL - Concept Explained

The DATA DIVISION is that part of the COBOL program where every data item processed by the program is described.
It is important to note that, unless an item is described in the DATA DIVISION it cannot be used in the PROCEDURE DIVISION.

DATA DIVISION consists of various sections:

1) FILE SECTION: This includes the descriptions of all the data items that should be read from or written onto some external file.

2) WORKING-STORAGE SECTION: The data items which are developed internally as intermediate results as well as the constants are described in this section.

The format is as follows:

DATA DIVISION.
FILE SECTION.
...................................
....[file section entries]...
...................................
WORKING-STORAGE SECTION.
..........................................
....[working storage entries]...
..........................................


All the section names as well as the division name must be coded as margin A entries.

Both these sections are optional i.e. a particular section may be omitted if there is no data that may be described.

Replies

You are reading an archived discussion.

Related Posts

Hi All, Guys after studying many book on electrical, I have a doubt to clear relating the insulator and dielectric material as they are used interchangeably in the text. Is...
Picture Clauses Every type of data must have a picture. This determines the type of data that it is. There is a distinction between the pictures that are used for...
In the linked representation of a binary tree, additional space is required to store the two links of each node. For leaf nodes, these fields always have nil values as...
Load Rejection Test (Governor Test) The purpose of Turbine Load Rejection Test is to verify and demonstrate the governor function to sustain a load rejection in order to prevent the...
Does anybody here taken a subject strength of materials???😒