Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

COBOL Lessons 1

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Lesson 1

INTRODUCTION

I. What is COBOL?

COBOL stands for Common Business Oriented Language. It is a high-level programming


language design specifically for business applications such as payroll, inventory, & etc.

3 Levels of Programming Language


a. Low-level - Assembly Language
b. Middle-level - C Language scanf(“%d”, &x);
c. High-level - COBOL – OPEN, CLOSE, READ, WRITE

II. Nature of COBOL


1. Common Language
2. Business-Oriented Language
3. Standard Language
4. English-like Language
5. User-friendly Language
6. Etc.

III. Features of COBOL Language


1. It is machine independent
2. It is easy to maintain
3. It is easy to understand
4. COBOL programs are uniquely organized
5. A COBOL program can handle voluminous amount of data
6. Advanced file handling capabilities.

IV. History of COBOL

COBOL was developed by a group called CODASYL


1959
(Conference on Data Systems Languages) Committee
The first COBOL compilers became available in the
1960
market
The first ANS version of COBOL was developed by the
1968
American National Standards Institute (ANSI)
The second version of ANS COBOL was developed
1974
(COBOL-74)
The more efficient and standardized version of ANS
1985
COBOL was developed (COBOL-85)
Visual COBOL is the most familiar version of COBOL
Present Time Object-Oriented COBOL
COBOL-CICS
COBOL ‘74
COBOL ‘85
if AVE is greater than or equal to
if AVE >= 75
75
COMPUTE ave=(q1+q2)/2.

V. Features of COBOL Program


1. English-like syntax
2. Unusual length compared with other programs
3. Column-sensitive – COBOL - move, MOVE, MoVe

C, java, c# – case-sensitive - float ave; float AVE; scanf(); SCANF();

4. Spacing between any program segments printf();scanf();print();


IDENTIFICATION DIVISION.
PROGRAM-ID. SAMPLE.
AUTHOR. BSIT 2-4 and 2-1N.

5. Use of indentions
if (x<y)
printf( );
else if (x>y)
printf();
else
printf();

VI. 4 Divisions of COBOL


1. IDENTIFICATION DIVISION.
2. ENVIRONMENT DIVISION.
3. DATA DIVISION.
4. PROCEDURE DIVISION.

VII. The COBOL Coding Form:

COLUMNS DESCRIPTIONS
1–6 Page & Sequence Number Area
Indicator Area

7 a. used to add comment *

b. used for continuation of nonnumeric literals OR string -

Program Area
- this area contains the COBOL source program which is
subdivided into 2 areas because there are certain entries
that must begin in Area A (8 to 11) and others in
Area B (12 to 72 ).

Area A entries:
a. division headers
b. section headers
8 – 72
c. paragraph headers / entries
d. FD (file description)
e. level number 01 - record

Area B entries:
a. source statements
b. clauses
c. level no. 02 – 49

73 – 80 Identification Area

You might also like