COBOL Programming Syntax

This section contains numerous example programs for better understanding of COBOL.

SAMPLE PROGRAM -1

This is a demo program to learn and understand major difference between elementary/individual item and group item.

* * * * THE OUTPUT WILL BE * * * *

SAMPLE PROGRAM -2

This is a demo program to learn and understand various level numbers in details.

OUTPUT:

Sample program – 3

This is a demo program to learn and understand the clear use of pic/picture clause.

THE OUTPUT WILL BE:

Sample program -4

This is a demo program to learn and understand the concept of value clause.

THE OUTPUT WILL BE:

SAMPLE PROGRAM -5

This is a demo program to create record of an employee.

THE OUTPUT WILL BE:

Here in this program, we have created a record of an employee working for a firm XYZ. This program is designed to display all the details of an employee, such as, his gender and his scores acquired in previous survey.

source