COBOL (Common Business Oriented Language) was one of the earliest high-level programming languages.
COBOL was developed in 1959 by the Conference on Data Systems Languages (CODASYL). This committee was a formed by a joint effort of industry, major universities, and the United States Government.
COBOL programs are in use globally in governmental and military agencies, in commercial enterprises. 95% financial and insurance business is on COBOL in US
In 1997, the Gartner Group reported that 80% of the world's business ran on COBOL with over 200 billion lines of code in existence and with an estimated 5 billion lines of new code annually.
- COBOL Program Structure
- COBOL Divisions
- IDENTIFICATION DIVISION
- ENVIRONMENT DIVISION
- DATA DIVISION
- PROCEDURE DIVISION
- Data Items
- Level Numbers
- COMPUTATIONAL variables
- COBOL Verbs
- Conditional Expressions
- Class condition
- Condition-name condition
- Relation condition
- Sign condition
- Negated simple condition
- Combined conditions
- File Handling
- Programming Practices
COBOL Program Structure
COBOL compiler accepts the source code in a standard format. There are 80 character positions on each line of source code
- The sequence number area can be used to tag a statement line. we can populate any character in this area and this area is optional
- This field can be populated with Slash (/) or Hyphen (-) for denoting continuation or Asterisk (*) for commenting a line or "D" for debugging
Area A & Area B :
- Contains source code
The following items must begin in Area A
- Division header
- Section header
- Paragraph header or paragraph name
- Level indicator or level-number (01 and 77)
- DECLARATIVES and END DECLARATIVES.
- End program header
The following items must begin in Area B
- Entries, sentences, statements, clauses
- Continuation lines.
The following items can begin in either Area A or Area B:
- Comment lines
- Compiler-directing statements
- Debugging lines
- COBOL compiler will ignore the data in these positions.