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
Identification Division: The Identification Division is the first division of each and every COBOL source program. The paragraph PROGRAM-ID is necessary in most of the mac

Rules of read statements: The next record is identified according to the rules as shown below: (i) Whenever the READ NEXT statement is the initial statement to be executed

MERGE VERB WITH OUTPUT PROCEDURE: Like the sort verb, the merge verb can also have an output procedure. The syntax of the MERGE verb is as shown below:   The r

Example of Nested if statement: Illustration: Consider the following sentence The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marke

Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing.   Z    *  $  -    +    CR    DB    .    ,    B    O    /

ON SIZE ERROR OPTION:   If after an arithmetic expression, the result exceeds the highest value which can be accommodated in the result; this error is termed as size error. T

RULES OF MOVE VERB:  The Data movement is managed by the rules which are as shown below: (a) The contents of the identifier - 1 or the value of the literal - 1 is moved to

START STATEMENT: The START statement places the files to the initial logical record whose record key satisfies the condition specified by the KEY phrase. The access mode shoul

COMPUTE VERB: The COMPUTE verb is very powerful. All the evaluations performed by the other 4 verbs can also be completed easily by using the COMPUTE verb. Its normal format i

OCCURS CLAUSE - PROGRAM: We have to write a program to elaborate occurs clause. Get names and marks of the students and show them on the screen.   identification division.