Your SlideShare is downloading. ×
All Around COBOL
By
V. Kishore Kumar M.C.A.
Mainframe Developer
Cognizant, Chennai.
Is there Still market for COBOL
skills/developers?
• COBOL is dead right?
• All the IT developer jobs now are in modern
la...
Survey Report @ 2009
• 70-75% of the business and transaction
systems around the world run on COBOL. This
includes credit ...
Survey Report @ 2009
• 90% of global financial transactions are
processed in COBOL.
• The language supports over 30 billio...
Survey Report @ 2009
• Around 5 billion lines of new COBOL code are
added to live systems every year.
• The investment mad...
COBOL
• COmmon Business Oriented Language – 1959.
• High Level Structured Language.
• Can be used with database like VSAM,...
Program Structure
Program Structure
• Division is a block of code, usually containing
one or more sections.
– It starts where the division n...
The COBOL Divisions
• Identification Division :
– Names the program.
– Optionally, documents the date the program was
writ...
Identification Division
• Environment Division :
– Machine Dependent details such as computer
used and peripheral devices.
– Consists of 2 section...
• Input-Output Section:
– Primarily used to code the FILE-CONTROL
paragraph.
– Associate the files to be used in program w...
• All the data used by the program is defined.
• It is divided into 5 sections
– File Section
– Working-storage Section
– ...
• File Section :
– Defines all the files that will be used in the
program.
– There will be one File Descriptor(FD) for eac...
• Working-Storage Section:
– Used to define any data that will be used in
program but not a part of file.
• Linkage Sectio...
• Consists of a series of procedures called
paragraphs, each designed to perform a
specific function.
• All statements are...
Sample COBOL Program Layout
COBOL Program Layout
COBOL Program Layout
Picture Clause
• Used to specify the type and size of an
elementary data item.
Data Items – Level Numbers
• Levels 01-49 are used to create hierarchical
data items.
• The highest level item in the hier...
Data Items – Level Numbers
COBOL Statements
• Display
• Accept
• Exit, STOP
• MOVE
• PERFORM
• Arithmetic Statements
DISPLAY Statement
• Exhibit data upon the primary output device.
ACCEPT Statement
• Acquire data from the primary input device or
various system fields.
EXIT & STOP Statement
• Used to exit routines or
programs.
• EXIT Program must be
used only in a called
Sub-Program.
• Use...
MOVE Statement
• Used to copy data items to other data items.
PERFORM Statement
• Used to execute the code.
PERFORM Statement
• Code can be executed in another area of the
program and is invoked by mentioning a
procedure or paragr...
Arithmetic Statements
• ADD
• SUBTRACT
• MULTIPLY
• DIVIDE
• COMPUTE
ADD
SUBTRACT
MULTIPLY
DIVIDE
DIVIDE
COMPUTE
All around cobol
Upcoming SlideShare
Loading in...5
×

All around cobol

213

Published on

Gives a basic idea about How COBOL is still in Use? & about basic things in it

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
213
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "All around cobol"

  1. 1. All Around COBOL By V. Kishore Kumar M.C.A. Mainframe Developer Cognizant, Chennai.
  2. 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. 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. 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. 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. 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.
  7. 7. Program Structure
  8. 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. 9. The COBOL Divisions • Identification Division : – Names the program. – Optionally, documents the date the program was written. – The compilation date and – Other pertinent information.
  10. 10. Identification Division
  11. 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. 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. 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. 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. 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. 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
  17. 17. Sample COBOL Program Layout
  18. 18. COBOL Program Layout
  19. 19. COBOL Program Layout
  20. 20. Picture Clause • Used to specify the type and size of an elementary data item.
  21. 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.
  22. 22. Data Items – Level Numbers
  23. 23. COBOL Statements • Display • Accept • Exit, STOP • MOVE • PERFORM • Arithmetic Statements
  24. 24. DISPLAY Statement • Exhibit data upon the primary output device.
  25. 25. ACCEPT Statement • Acquire data from the primary input device or various system fields.
  26. 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.
  27. 27. MOVE Statement • Used to copy data items to other data items.
  28. 28. PERFORM Statement • Used to execute the code.
  29. 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.
  30. 30. Arithmetic Statements • ADD • SUBTRACT • MULTIPLY • DIVIDE • COMPUTE
  31. 31. ADD SUBTRACT
  32. 32. MULTIPLY
  33. 33. DIVIDE
  34. 34. DIVIDE
  35. 35. COMPUTE

×