COBOL COmmon Business Oriented Language  Work began in 1959 and has never stopped.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

Credit hours: 4 Contact hours: 50 (30 Theory, 20 Lab) Prerequisite: TB143 Introduction to Personal Computers.
DT266/2 COBOL Basics – Declaring Data Basic Operations.
The Future of COBOL A Focus on Interactive Programming Appendix C Stern & Stern.
COBOL LANGUAGE COmmon Business Oriented Language Sarunya Dechasajja
- Kav Shrestha.  Introduction  History  Features  COBOL Usage  Characteristics  Structure of COBOL Programs  COBOL Divisions  Data Items  Variable.
BY: JOSHUA THOMAS IGNATIUS TOWERS COBOL. Overview What is COBOL History Design Implementations What did it do Program structure Data types Syntax Sample.
A Quick Overview of Languages. FORTRAN Designed in 1955 First release of the compiler in 1957 Algebraic in nature Scientific (numeric not string oriented)
Computers: Tools for an Information Age
COBOL for the 21 st Century Stern, Stern, Ley Chapter 1 INTRODUCTION TO STRUCTURED PROGRAM DESIGN IN COBOL.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
COBOL for the 21st Century
PowerPoint Presentation: Richard H. Baum, Ph.D. DeVry Institute of Technology 9th Edition Structured COBOL Programming Nancy Stern Hofstra University Robert.
Assembly & Machine Languages
CS102 Introduction to Computer Programming
Programming Languages: Telling the Computers What to Do Chapter 16.
Structured COBOL Programming, Stern & Stern, 9th edition
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
1Object-Oriented Program Development Using C++ Computer Science and Programming Languages Computers are ubiquitous Computer literacy is essential Computer.
Chapter To familiarize you with  Why COBOL is a popular business-oriented language.  Programming practices and techniques  History of COBOL.
1-1 COBOL for the 21 st Century Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout (Emeritus)
Introduction to COBOL. COBOL  COBOL is an acronym which stands for Common Business Oriented Language.  The name indicates the target area of COBOL applications.
Modifications to program Addda.cbl Please use speaker notes for additional information!
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
History COBOL (Common Business Oriented Language) was one of the earliest high-level programming languages. COBOL was first proposed in 1959 by the Conference.
CMPE13Cyrus Bazeghi 1 Programming Languages Telling computers what to do.
Totals on the Screen Please use speaker notes for additional information!
3-1 Chapter 3. To familiarize you with  Ways in which data is organized in COBOL  Rules for forming data-names  Defining input and output files in.
1 Interactive vs Batch Programs Cobol suited for developing both types of programs Interactive programs Accept input data from keyboard Input data processed.
CS CS Computing for Business Instructor:David Tucker GTA:Batul Mirza.
Chapter 7 File I/O 1. File, Record & Field 2 The file is just a chunk of disk space set aside for data and given a name. The computer has no idea what.
Robert Crawford, MBA West Middle School.  Explain how the binary system is used by computers.  Describe how software is written and translated  Summarize.
National Diploma Unit 4 Introduction to Software Development Introduction to Programming Languages.
1 The Procedure Division Chapter 4. 2 Main Two Sections File Section –Used to define files and record formats –Field names within records Working Storage.
CPSC3111/CISM3111 COBOL Structured COBOL Programming Text: murach’s structured COBOL Authors: Murach, Prince, Menendez.
1 IDENTIFICATION and ENVIRONMENT DIVISIONS. 2 Objectives Basic Structure of COBOL Programs General Coding and Formatting Rules Identification and the.
HELLO WORLD program in COBOL - CIS12 Please use speaker notes for additional information!
Structured Programming
COBOL Screens Please use speaker notes for additional information!
COmmon Business Oriented Language
Structured COBOL Programming, Stern & Stern, 9th Edition CHAPTER 2 Cobol Language Fundamentals.
1.
Chapter 2 Using Variables and Constant. What is a Constant ? The data in COBOL programs falls in two broad categories: – Constants and Variables A constant.
PowerPoint Presentation: Richard H. Baum, Ph.D. DeVry Institute of Technology 9th Edition Structured COBOL Programming Nancy Stern Hofstra University Robert.
Submitted To: Rutvi sarang Submitted By: Kushal Bhagat.
IBM-Mainframes COBOL Class-1. Background and History  COBOL is an acronym for: Common Business Oriented Language  COBOL was developed in 1959 by the.
Module 1 1. Cobol Hierarchy Revised on COBOL Hierarchy There are four DIVISIONS:- IDENTIFICATION DIVISION. ENVIRONMENT DIVISION. DATA DIVISION.
©2016 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. CSC 110 – INTRO TO COMPUTING - PROGRAMMING Overview of Programming.
Analysis of SAMPLE1.CBL Please check speaker notes for additional information!
Invent Your Own Computer Games with Python
Week 2/3 - 2nd Lecture Intro to COBOL Programming Defining Files and Processing Data.
CMSC 104, Version 8/061L09VariablesInC.ppt Variables in C Topics Naming Variables Declaring Variables Using Variables The Assignment Statement Reading.
General Introduction Algorithms. Let’s write a program  A program is a collection of statements written in a language the computer understands.  A computer.
Invitation to Computer Science 6th Edition
CSCI-235 Micro-Computer Applications
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Structured Programming
Programming in COBOL.
Application Development Theory
Computer Programming.
Designing and Debugging Batch and Interactive COBOL Programs
Chapter 3 The DATA DIVISION.
An Introduction to Structured Program Design in COBOL
William, Andrew, Stephanio, Michael
Low Level Programming Languages
Introduction to Computer Programming
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Programming in COBOL.
Programming Logic and Design Eighth Edition
Presentation transcript:

COBOL COmmon Business Oriented Language  Work began in 1959 and has never stopped

CODASYL Conference on Data Systems Languages  Primarily Business Wanted a language designed for their needs. The resulting language reflected business needs and the computing environment.

File Formatting You can read to or from records specifying precision by digit. While it is different than what we are used to, it is as powerful as newer languages for records.

Records COBOL understands the idea of a record Has incorporated support for composite and atomic attributes from the beginning This understanding avoids some of the more tedious aspects of programming with records by minimizing parsing.

Computing Environment Words and Bytes: Many assumptions we make every day the COBOL programmer could not rely on. Environment Division: Specifies to the compiler and programmer the target environments.  More or less just comments now, useful for maintenance.

Punch Card

Changes with Time Certainly the most difficult part of COBOL is that all new versions must be backwards compatible.  It is possible to get nearly 817 keywords (ca.1985)

Artifacts Program line numbers for program cards Spacing (Areas A & B)  While not as familiar or as “clean” as {} block structures, it does add a visual structure to a program

Divisions and Sections Sections subdivide four primary divisions  Provides a top level organization for programs. More later.

Procedural Paradigm Supported but not enforced Centers mostly on GOTO (and in newer versions, IF/THEN) All procedures names are labels.  Newer versions support some OO features.

IDENTIFICATION DIVISION ENVIRONMENT DIVISION DATA DIVISION PROCEDURE DIVISION FOUR PROGRAM DIVISIONS

IDENTIFICATION DIVISION Provides the name of the program, who wrote it, when and where it was written, when it was compiled, and what security precautions(if any) should be taken to restrict access to the program or to the file it processes. Division should end with a set of English sentences giving a brief overview of what the program does.

ENVIRONMENT DIVISION Contains information about the computer(s) on which the COBOL program will be compiled and on which the resulting machine- language program will be run. It also gives a COBOL name to each file to be processed and assigns each file to a specified I/O device. This information defines the hardware environment in which programs runs.

DATA DIVISION Gives a brief description of each file to be processed, and then gives a detailed layout for the records in the file. Each field in a record is described in terms of its length and its type of data. The DATA DIVISION also describes in a memory area called WORKING- STORAGE. All data fields(in file records or in working-storage) must be described in the DATA DIVISION.

PROCEDURE DIVISION The computer is actually instructed as to what processing is to be carried out. The directions closely resemble English sentences.

SIMPLE SAMPLE PROGRAM 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.

SAMPLE PROGRAM “ ACCEPT_NUM” ID DIVISION PROGRAM-ID. ACCEPT DATA DIVISION WORKING-STORAGE SECTION WS-FIRST-NUMBER PIC 9(3) WS-SECOND-NUMBER PIC 9(3) WS-TOTAL PIC ZZZ9.

SAMPLE PROGRAM “ ACCEPT_NUM” ID DIVISION PROGRAM-ID. ACCEPT DATA DIVISION WORKING-STORAGE SECTION WS-FIRST-NUMBER PIC 9(3) WS-SECOND-NUMBER PIC 9(3) WS-TOTAL PIC ZZZ9.

SAMPLE PROGRAM “ ACCEPT_NUM” PROCEDURE DIVISION MAINLINE DISPLAY 'ENTER A NUMBER: ' ACCEPT WS-FIRST-NUMBER * DISPLAY 'ANOTHER NUMBER: ' ACCEPT WS-SECOND-NUMBER * COMPUTE WS-TOTAL = WS-FIRST-NUMBER + WS-SECOND- NUMBER DISPLAY 'THE TOTAL IS: ', WS-TOTAL STOP RUN.

SAMPLE PROGRAM “ ACCEPT_NUM SAMPLE RUN” ENTER A NUMBER: 7 ANOTHER NUMBER: 7 THE TOTAL IS: 14

COMPARED TO OTHER LANGUAGES “ THE GOOD SIDE” Self-Documenting Reserved Words Based on English Readability Easy to learn Business Oriented Non-proprietary(portable)

COMPARED TO OTHER LANGUAGES “ THE BAD SIDE" No encapsulation and little information hiding No block structure All variables are global Numbers closer to human arithmetic No recursion Not designed for graphical user environment Only best for business applications

SOURCES Newcomer, Lawrence R.. Theory and Problems of Programming with Structured COBOL.McGraw-Hill, Inc