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






Your posts are moderated
Related Questions
Size: The number of characters or digits needed to store the data item in the memory in termed as the Size of the data item. All the 4 general characteristics explained can

Environment Division: The Environment Division is the second division in the COBOL source program. It is mainly machine-dependent . The computer and all the peripheral dev

LABEL RECORD CLAUSE: This clause specifies whether or not the standard header and trailer labels must be present in the magnetic-tape files. VALUE OF CLAUSE: The VAL

Examples - Edit characters for numeric data: The following illustration illustrates the use of Z editing characters. The character b is used to indicate the space character an

Example of Perform statement: PERFORM BEGIN-CALCULATION THRU END-CALCULATION. Assume, BEGIN-CALCULATION and END-CALCULTION is paragraph names. The execution of the PERFORM

Illustration of Subtract verb: (a) SUBTRACT A FROM B. This illustration means that the value of A will be subtracted from the value of B and the subtracted result will be s

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

PROGRAM FOR SIMPLE PERFORM: We have to write a program to elaborate simple PERFORM statement Identification division. Program- id.  Perf1. Environment division. Da

FILE CHARACTERISTICS: The task of file handling is the responsibility of the system software termed as IOCS (Input-Output control system). Record Size: We know that th

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