COBOL Powerpoint Presentation
COBOL Powerpoint Presentation
HISTORY
COBOL
- Common Business Oriented Language
A third-generation programming
language and as one of the earliest highlevel programming languages; still wide
used today.
Business Computing Domain.
History (continued)
COBOL is non-proprietary.
COBOL is changing with the times. COBOL is being reenergized as an important component of moving
businesses to the Web seamlessly and efficiently.
Applications
Advantages
-
Simple
Portable
Maintainable
Self documenting
Disadvantages
-
- Very wordy
- Has a very rigid format
- Not designed to handle
scientific applications
Structure of COBOL
Distinct features
The
A level number
A data-name or identifier
A Picture clause.
Basic Commands
ADD a TO b GIVING c.
SUBTRACT a FROM b GIVING c.
MULTIPLY a BY b GIVING c.
DIVIDE a INTO b GIVING c.
COMPUTE x = a + b * c.
MOVE a TO b c
SORT sort-file
ON ASCENDING KEY k
USING inventory-file
GIVING sorted-inventory-file .
MERGE merge-work-file
ON ASCENDING KEY K
USING input-file1 input-file2
GIVING output-file .
DISPLAY
Accept
total-cost.
identifier.
Sample Program
000100
000200
000300
000400
000500
000600
000700
000800
000900
001000
001100
101200
101300
101400
101500
101600
(HELLO WORLD)
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOWORLD.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. RM-COBOL.
OBJECT-COMPUTER. RM-COBOL.
DATA DIVISION.
FILE SECTION.
PROCEDURE DIVISION.
MAIN-LOGIC SECTION.
DISPLAY "Hello world!"
STOP RUN.
2.
Execute
If no errors:
COBOL VERSIONS
ANS
COBOL 1968
COBOL 1974
COBOL 1985
COBOL 2002 and object-oriented
COBOL
Version 4.1 (September 2010)
THE END...
Prepared
by:
4 - CpE