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
Record Description for the Variable-length Records: When the variable- length records consists of records of various lengths, each record type is to be explained at level 01 f

Example of read statement: Illustration: READ OLD-MASTER AT END MOVE ZERO TO END-OF-RECORDS. As a result of this statement, generally the next record from the OLD-MAST

DELETE STATEMENT: The format of the delete statement is as shown below: DELETE   file-name RECORD   [  ;   INVALID   KEY  imperative-statement  ] Whenever the ACCESS MOD

single program how may when statement has used

PROGRAM TO DEMONSTRATE MERGE VERB: The two files for which a record having 2 fields viz. Account Number and Name are already available. Now Merge these two files and create a

RESERVE clause: This clause indicates the number of buffers to be used for the file. Integer-1 specifies this number. ORGANIZATION/ACCESS clause: These two clause

ON SIZE ERROR OPTION: Whenever a size error occurs, the contents of the result field after the operation is unpredictable.  Though, the processing is not-terminated and the co

CLASS CONDITION:   The class condition establishes whether or not the value of the operand is numeric or alphabetic. The operand is numeric if it contains only the digits 0 t

READ STATEMENTS: The common format for the read statements is as shown bellow. Format 1: READ file-name RECORD [ INTO   identifier ] [  ;  AT   END     imperative-s

DATA RECORD CLAUSE: The DATA RECORD clause, documents the record names defined for the file. For illustration, DATA RECORDS ARE REC-1, REC-2, REC-3 that means there are 3diffe