Structure of a COBOL Program
by Dinesh[ Edit ] 2012-07-23 19:06:00
Structure of a COBOL Program
Every COBOL program must have the following 4 divisions in the order in which they are specified below.
1. Identification division
2. Environment Division
3. Data Division
4. Procedure Division
In the
Identification division the details about the author, date of writing the program etc will be specified.
In the
Environment division, the details about the computer environment under which the program was written and compiled etc will be notified.
In the
Data division, the variables that are used by the program will be defined and it is an important division for the program.
In the
procedure division, all the programming statements (Executable Cobol statements) will be written and it is the most important division.
Under the divisions there are various sections intended for specific purposes. To name a few, working-storage section and File section come under Data division. Their purpose will be to allocate memory space for the variables and to notify the files that are to be used with the program.
A statement of a COBOL program can be written in one or more coding lines. To continue in the next line one has to use a hyphen (-) in column 7.