Popular

Name the divisions in a COBOL Program.

The four divisions in a COBOL Program are IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, DATA DIVISION and PROCEDURE DIVISION.


Tell us briefly about each division.
IDENTIFICATION DIVISION
is used to establish the Identity of the program, and assigns a unique name to the Program.

ENVIRONMENT DIVISION tells the environment – SOURCE-COMPUTER and OBJECT-COMPUTER on which the COBOL Program would run. It also declares the Input and Output file-names, accessed by the COBOL Program.

DATA DIVISION is the place in the COBOL Program, that creates Storage areas(COBOL Variables) for storing Data. Generally, COBOL Programs read data-records from Input-File, or Write records to Output-file. When the data-record from the Input-file is read, there's got to be a place in the COBOL Program, where the Input File Data arrives, its received and it has to be stored. COBOL Programs may do some rough-work. Such variables which act like a temporary scratch-pad, where you could do some rough-work, and which are there only as long as the COBOL Program runs are called WORKING-STORAGE Areas.

PROCEDURE DIVISION is the starting-point of the COBOL Program, where the Program begins to run. You code the Instructions that you to perform one-by-one in the PROCEDURE DIVISION.

No comments:

Post a Comment