Structure of a cobol program, COBOL Programming

Structure of a COBOL Program:

Every COBOL program should have the 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 particulars about the author, date of writing the program etc will be specified.

In the Environment division, the particulars about the computer environment under which the program was compiled and written etc. will be informed.

In the Data division, the variables which are used by the program will be defined and it is a significant division for the program.

In the procedure division, the programming statements will be written and it is the most important division.

Under the divisions there are different sections intended for specific purposes. To name a few, the working-storage section and File section come under the Data division. Their aim will be to allocate memory space for the variables and to notify the files which are to be used with the program.

The statement of a COBOL program can be written in one or more coding lines. To carry on in the next line one has to use the hyphen (-) in the column 7.

Posted Date: 10/16/2012 3:23:34 AM | Location : United States







Related Discussions:- Structure of a cobol program, Assignment Help, Ask Question on Structure of a cobol program, Get Answer, Expert's Help, Structure of a cobol program Discussions

Write discussion on Structure of a cobol program
Your posts are moderated
Related Questions
PICTURE specification: The size of a group item is equivalent to the total of the sizes of all the subordinate elementary items. The group item class is alphanumeric. The i

PROGRAM USING OCCURS CLAUSE: We have to write a simple program to demonstrate Occurs Clause. Get the employee details for 3 persons and compute the total salary. identifica

Figurative Constants: The Figurative constants have several fixed names and the compiler recognizes these names and it sets up the equivalent values in the object program.

RULES OF RENAMES CLAUSE:   The rules below should be observed while using the RENAMES clause: (i) All RENAMES entries should be written only after the last record descript

ROUNDED OPTION: Let us consider the DATA DIVISION entries which are as shown below: Now, subsequent to the execution of the statement ADD A B GIVING C, the C will hold

INDEXED SEQUENTIAL FILES: In the indexed sequential files which are also known as indexed files, the records are stored in the sequence order generally in ascending order. In

PROGRAM FOR DIVIDE VERB:   We have to write an easy program to elaborate DIVIDE verb. You can also use edit characters in the program. Identification division. Program-

CLOSE statement: The simplified syntax of the CLOSE statement is as shown below:   CLOSE          file-name-1   [WITH   LOCK   ]                         [  , file-

The LENDER Bank offers mortgages on homes valued up to $500,000. The required down payment is calculated as follows: 4% of the first $60,000 borrowed 8% of the next $30,000 borro

SEQUENTIAL FILE CREATION AND REWRITING: We have to write a program to create a student file with just two fields: sno i.e. Student Number and same i.e. Student Name. Add a few