19-01-2012, 12:57 PM
COBOL (COmmon Business Oriented Language)
50172016-Mainframe-Refresher-Part-1.pdf (Size: 241.19 KB / Downloads: 702)
History.
Developed by 1959 by a group called COnference on Data Systems Language
(CODASYL). First COBOL compiler was released by December 1959.
First ANSI approved version – 1968
Modified ANSI approved version – 1974 (OS/VS COBOL)
Modified ANSI approved version – 1985 (VS COBOL 2)
This book is written based on IBM COBOL for OS/390 V2R2.
Divisions in COBOL.
There are four divisions in a COBOL program and Data division is optional.
1.Identification Division.
2.Environment Division.
3.Data Division.
4.Procedure Division.
Identification Division.
This is the first division and the program is identified here. Paragraph
PROGRAM-ID followed by user-defined name is mandatory. All other paragraphs are
optional and used for documentation. The length of user-defined name for IBM
COBOL is EIGHT.
Environment Division.
Only machine dependant division of COBOL program. It supplies information
about the hardware or computer equipment to be used on the program. When your
program moves from one computer to another computer, the only section that may need to be changed is ENVIRONMENT division.
Configuration Section.
It supplies information concerning the computer on which the program will be
compiled (SOURCE-COMPUTER) and executed (OBJECT-COMPUTER). It consists of
three paragraphs – SOURCE COMPUTER, OBJECT-COMPUTER and SPECIAL-NAMES.
This is OPTIONAL section from COBOL 85.