Friday, November 18, 2011

Introduction about cobol



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.

Speciality.

  1. First language developed for commercial application development, which can efficiently handle millions of data.
  2. Procedure Oriented Language         - Problem is segmented into several tasks. Each task is written as a Paragraph in Procedure Division and executed in a logical sequence as mentioned. 
  3. English Like language                    – Easy to learn, code and maintain.

Coding Sheet.

1        7        12                                                                               72            80


           COL-A   COLUMN-B


1-6     Page/line numbers – Optional (automatically assigned by compiler)
7        Continuity (-), Comment (*), Starting a new page (/)
           Debugging lines (D)
8-11    Column A –Division, Section, Paragraph, 01,77 declarations must begin here.
12-72    Column B –All the other declarations/statements begin here.
73-80  Identification field. It will be ignored by the compiler but visible in the source              listing.

Language Structure.


Character
Digits (0-9), Alphabets (A-Z), Space (b),
Special Characters (+ - * /  (  ) = $  ; “ > < .  ,)
Word
One or more characters- User defined or Reserved
Clause
One or more words. It specifies an attribute for an entry
Statement
One or more valid words and clauses
Sentence
One or more statements terminated by a period
Paragraph
One or more sentences.
Section
One or more paragraphs.
Division
One or more sections or paragraphs
Program
Made up of four divisions

No comments:

Post a Comment