100% found this document useful (1 vote)
2K views

COBOL Powerpoint Presentation

COBOL is a third-generation programming language first used in 1959 and still widely used today for business applications. It was designed to be portable, simple, and readable. More than 80% of daily business transactions are processed using COBOL. COBOL uses a hierarchical structure with four main divisions and has only three basic data types. Some key features include its ability to name variables connotatively and define variables in detail.

Uploaded by

ApolImmaculata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
2K views

COBOL Powerpoint Presentation

COBOL is a third-generation programming language first used in 1959 and still widely used today for business applications. It was designed to be portable, simple, and readable. More than 80% of daily business transactions are processed using COBOL. COBOL uses a hierarchical structure with four main divisions and has only three basic data types. Some key features include its ability to name variables connotatively and define variables in detail.

Uploaded by

ApolImmaculata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

COBOL

HISTORY

COBOL
- Common Business Oriented Language

The Mother of COBOL, Grace Hopper, is


said to have invented the term "computer
bug" and "de-bug.

A third-generation programming
language and as one of the earliest highlevel programming languages; still wide
used today.
Business Computing Domain.

First proposed in 1959 by the Conference


on Data Systems Languages (CODASYL).

History (continued)

It has emerged as the leading data processing


language in the business world

COBOL is non-proprietary.

More than 80 percent of all daily business transactions


are processed in COBOL.

COBOL is changing with the times. COBOL is being reenergized as an important component of moving
businesses to the Web seamlessly and efficiently.

Applications

Like the name suggests, COBOL was meant to be


common or compatible among a significant group
of manufacturers

COBOL is designed for developing business,


typically file-oriented, applications, and is not
designed for writing systems programs.

Primary domain in business, finance, and


administrative systems for companies and
governments.

Pros and Cons

Advantages
-

Simple
Portable
Maintainable
Self documenting

Disadvantages
-

- Very wordy
- Has a very rigid format
- Not designed to handle
scientific applications

Structure of COBOL

COBOL programs are hierarchical in structure.

Each element of the hierarchy consists of one or more


subordinate elements.

The levels of hierarchy are Divisions, Sections,


Paragraphs, Sentences and Statements

There are 4 main divisions and each division


provides an essential part of the information
required by the complier

Structure of COBOL (continued)

At the top of the COBOL hierarchy are the four divisions.


The sequence in which they are specified is fixed, and must follow
the order:

IDENTIFICATION DIVISION supplies information about the program


to the programmer and the compiler.

ENVIRONMENT DIVISION is used to describe the environment in


which the program will run.

DATA DIVISION provides descriptions of the data-items processed by


the program.

PROCEDURE DIVISION contains the code used to manipulate the data


described in the DATA DIVISION. It is here that the programmer
describes his algorithm.

Some COBOL compilers require that all the divisions be present in a


program while others only require the IDENTIFICATION DIVISION
and the PROCEDURE DIVISION

Distinct features
The

language that automated business


Allows names to be truly connotative
Every variable is defined in detail
Offers object, visual programming
environments
Class libraries
Rapid application capabilities
Integration with the world wide web

Data Types in COBOL

COBOL is not a strongly typed language

In COBOL, there are only three data types

Numeric, aphanumeric (text/string), alphabetic

Data types are declared using:

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 .

Basic Commands (Contd.)

MERGE merge-work-file
ON ASCENDING KEY K
USING input-file1 input-file2
GIVING output-file .

DISPLAY
Accept

total-cost.
identifier.

PERFORM paragraphname1 THROUGH paragraphname2


VARYING index FROM value1 BY value2
UNTIL condition.

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.

Writing, Compiling and


Executing
1.

Creating .cbl programs

2.

Notepad/Text Editors and save as .cbl

Compiling and Running

Open Cobol Directory


Compile

Type in prompt: rmcobol <filename.extn>


filename.extn is the source code

Execute

If no errors:

Type in prompt: runcobol <filename>


Filename is the object code

COBOL VERSIONS
ANS

COBOL 1968
COBOL 1974
COBOL 1985
COBOL 2002 and object-oriented
COBOL
Version 4.1 (September 2010)

THE END...
Prepared

by:

Crystal Genna F. Antinero Venus R.


Tongohan
Mark A. Soliva
Irene T. Pransal

4 - CpE

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy