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
NONSTANDARD CLAUSES: The various clauses explained above are as per the ANSI standard. Also, most compilers provide for additional nonstandard clauses to meet the specific nec

GIVING    file-name-5. The input files to be merged through the MERGE statements which are specified in the USING phrase. These files should be sequential files and should be

IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem

Illustration of Renames clause: In the illustration, PAT-OTHER-THAN-BASIC will become a fresh group consisting of DEARNESS-ALLOWANCE, HOUSE-RENT & MTHLY-INCENTIVE. Keep in min

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.

Write a COBOL IF sentence to use the values of numeric variables EXAM and COURSEWORK , both assumed to be with format PIC 999 and in the range 0 to 100 and to move the value:

Configuration Section: This section holds an overall specification of the computer used for the purpose of the compilation and execution of the program. There are in all 3 par

UPDATING OF THE RELATIVE AND INDEXED FILES: The Sequential files are updated by creating a new master file from an existing old master file and a transaction file. Such an Upda

PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION (RANDOM MODE): We have to write a program to create an Indexed Sequential File in random mode for Student particulars. Suppose jus

SEQUENTIAL FILES WITH THE VARIABLE-LENGTH RECORDS: The Magnetic - tape or disk files can hold variable-length records. In this situation the file can have records with various