2. Is there Still market for COBOL
skills/developers?
• COBOL is dead right?
• All the IT developer jobs now are in modern
languages like C++, .Net & Java right?
3. Survey Report @ 2009
• 70-75% of the business and transaction
systems around the world run on COBOL. This
includes credit card systems, ATMs, ticket
purchasing, retail/POS systems, banking,
payroll systems, telephone/cell calls, grocery
stores, hospital systems, government systems,
airline systems, insurance systems,
automotive systems, traffic signal systems.
4. Survey Report @ 2009
• 90% of global financial transactions are
processed in COBOL.
• The language supports over 30 billion
transactions per day.
• There are 1.5-2 million developers, globally,
working with COBOL code.
• There are around 200 billion lines of COBOL
code in use.
5. Survey Report @ 2009
• Around 5 billion lines of new COBOL code are
added to live systems every year.
• The investment made into COBOL systems
over the past 50 years is said to be worth
about $2 trillion dollars.
6. COBOL
• COmmon Business Oriented Language – 1959.
• High Level Structured Language.
• Can be used with database like VSAM, DB2 or
IDMS.
• Can handle huge volumes of data.
• COBOL applications can be easily maintained.
8. Program Structure
• Division is a block of code, usually containing
one or more sections.
– It starts where the division name is encountered.
– It ends with the beginning of the next division.
• A COBOL program has 4 divisions.
Identification Division Environment Division
Data Division Procedure Division
9. The COBOL Divisions
• Identification Division :
– Names the program.
– Optionally, documents the date the program was
written.
– The compilation date and
– Other pertinent information.
11. • Environment Division :
– Machine Dependent details such as computer
used and peripheral devices.
– Consists of 2 sections
• The Configuration Section
• The Input-Output Section
Environment Division
12. • Input-Output Section:
– Primarily used to code the FILE-CONTROL
paragraph.
– Associate the files to be used in program with
specific I/O devices.
Environment Division
13. • All the data used by the program is defined.
• It is divided into 5 sections
– File Section
– Working-storage Section
– Linkage Section
– Report Section and
– Communication Section
Data Division
14. • File Section :
– Defines all the files that will be used in the
program.
– There will be one File Descriptor(FD) for each file
followed by a record description for each record
format.
Data Division
15. • Working-Storage Section:
– Used to define any data that will be used in
program but not a part of file.
• Linkage Section:
– Used in a subprogram that will be passed as
arguments to the routine.
Data Division
16. • Consists of a series of procedures called
paragraphs, each designed to perform a
specific function.
• All statements are terminated by a period(.).
Procedure Division
21. Data Items – Level Numbers
• Levels 01-49 are used to create hierarchical
data items.
• The highest level item in the hierarchy will
always be the 01 item.
• Items which contains other items are called
Group Items.
• Items which don’t contain other data items
are called Elementary Items.
26. EXIT & STOP Statement
• Used to exit routines or
programs.
• EXIT Program must be
used only in a called
Sub-Program.
• Used to STOP programs.
• STOP RUN Terminates
the program.
29. PERFORM Statement
• Code can be executed in another area of the
program and is invoked by mentioning a
procedure or paragraph name.
• Inline Perform, code is executed inside the
perform statement.