COBOL LANGUAGE COmmon Business Oriented Language Sarunya Dechasajja 47541487.

Slides:



Advertisements
Similar presentations
Chapter 3: Modules, Hierarchy Charts, and Documentation
Advertisements

2-1 Chapter 2.  Coding Requirements of IDENTIFICATION DIVISION  Sections of ENVIRONMENT DIVISION  Assigning Files to Devices in ENVIRONMENT DIVISION.
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
The Future of COBOL A Focus on Interactive Programming Appendix C Stern & Stern.
Programming Logic and Design Fourth Edition, Introductory
 2005 Pearson Education, Inc. All rights reserved Introduction.
- 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.
Chapter 15 Indexed Sequential Files. Disk File Organization File is collection of records Three major ways records stored or organized on disk - Sequential.
Software: Systems and Application Software
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 8: Designing and developing applications for z/OS.
Understanding the Mainline Logical Flow Through a Program (continued)
COBOL for the 21 st Century Stern, Stern, Ley Chapter 1 INTRODUCTION TO STRUCTURED PROGRAM DESIGN IN COBOL.
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
COBOL COmmon Business Oriented Language  Work began in 1959 and has never stopped.
COBOL for the 21st Century
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
CS102 Introduction to Computer Programming
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
A First Program Using C#
Structured COBOL Programming, Stern & Stern, 9th edition
4-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)
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
4-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)
1 Chapter 4. To familiarize you with methods used to 1. Access input and output files 2. Read data from an input file 3. Perform simple move operations.
Chapter To familiarize you with  Why COBOL is a popular business-oriented language.  Programming practices and techniques  History of COBOL.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
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!
History COBOL (Common Business Oriented Language) was one of the earliest high-level programming languages. COBOL was first proposed in 1959 by the Conference.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Principles of Information Systems, Sixth Edition Software: Systems and Application Software Chapter 4.
Programming Examples to Accompany Structure Topic Please use speaker notes for additional information!
COBOL Cobol is one of the most robust language in the software field, so far Cobol turned 50, in 2009 Cobol has stood the test of time Common Business.
Totals on the Screen Please use speaker notes for additional information!
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.
CPSC3111/CISM3111 COBOL Structured COBOL Programming Text: murach’s structured COBOL Authors: Murach, Prince, Menendez.
Structured Programming
Any Questions!. Test Coming Up! Agenda Printing with Externally Described Printer Files Arrays.
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.
IBM-Mainframes COBOL Class-1. Background and History  COBOL is an acronym for: Common Business Oriented Language  COBOL was developed in 1959 by the.
Principles of Information Systems, Sixth Edition Software: Systems and Application Software Chapter 4.
Principles of Information Systems, Sixth Edition Software: Systems and Application Software Chapter 4.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Agenda Computer Languages How to Write a Simple C Program
First appeared Features Popular uses Assembly 1949 For code that must directly interact with the hardware (drivers), embedded processors, processor specific.
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.
Random update Please use speaker notes for additional information!
Introduction to Sequential Files. COBOL's forte  COBOL is generally used in situations where the volume of data to be processed is large.  These systems.
General Introduction Algorithms. Let’s write a program  A program is a collection of statements written in a language the computer understands.  A computer.
Principles of Information Systems, Sixth Edition 1 Software: Systems and Application Software Chapter 4.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
Chapter 1: Introduction to Computers and Programming.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Introduction to Computer CC111
Introduction to Visual Basic 2008 Programming
Structured Programming
Programming in COBOL.
Designing and Debugging Batch and Interactive COBOL Programs
What Is a Program? A program is like an algorithm, but describes a process that is ready or can be made ready to run on a real computer Retrieved from:
An Introduction to Structured Program Design in COBOL
William, Andrew, Stephanio, Michael
Programming in COBOL.
Presentation transcript:

COBOL LANGUAGE COmmon Business Oriented Language Sarunya Dechasajja

BACKGROUND -Developed in 1959 by a group of computer professionals called the Conference on Data Systems Languages (CODASYL) -In 1968 the American National Standards Institute (ANSI) developed a standard form of the language. This version was known as American National Standard (ANS) COBOL. -Object-oriented COBOL is a subset of COBOL 97, which is the fourth edition in the continuing evolution of ANSI/ISO standard COBOL. -Like the C++ programming language, object- oriented COBOL compilers are available even as the language moves toward standardization.

DESCRIPTION OF COBOL LANGUAGE -COBOL is a Third-generation programming language, and one of the oldest programming languages still in active use. -Defining its primary domain in business, finance, and administrative system for companies and governments. -Example of COBOL standard: COBOL-68, COBOL- 74, COBOL-85 and COBOL 2002

LANGUAGE PROGRESSIVE

DISTINCTIVE CHARACTERISTIC -The language that automated business -Allows names to be truly connotative - permits both long names (up to 30 characters) and word-connector characters (dashes) -Every variable is defined in detail - this includes number of decimal digits and the location of the implied decimal point -File records are also described with great detail, as are lines to be output to a printer - ideal for printing accounting reports -Offers object, visual programming environments -Class Libraries -Rapid Application Capabilities -Integration with the World Wide Web

DISTINCTIVE CHARACTERISTIC COBOL, long associated with green screens, core dumps, and traditional mainframe connections, may at first glance seem at odds with object technology, push-button graphical interfaces, and interactive development environments. This perceived incongruity, however, is more a reflection of the mainframe’s ability to keep pace with the innovations of desktop and client- server computing than a flaw in the COBOL language.

DESIGN GOALS -One goal of COBOL's design was for it to be readable by managers, so the syntax had very much of an English-like flavor. -The specifications were to a great extent inspired by the FLOW-MATIC language invented by Grace Hopper -She then promoted COBOL’s use

CHARACTERISTICS COBOL is a simple language with a limited scope of function(no pointers, no user defined functions, no user defined types ). And that is the way it used to be but the introduction of OO-COBOL has changed all that. OO-COBOL retains all the advantages of previous versions but now includes - User Defined Functions - Object Orientation - National Characters - Unicode - Multiple Currency Symbols - Cultural Adaptability (Locales) - Dynamic Memory Allocation (pointers) - Data Validation Using New VALIDATE Verb - Binary and Floating Point Data Types - User Defined Data Types

SAMPLE PROGRAM: Displaying the message "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 BEGIN DISPLAY " " LINE 1 POSITION 1 ERASE EOS DISPLAY "Hello world!" LINE 15 POSITION STOP RUN MAIN-LOGIC-EXIT EXIT. Sample Run Hello world!

SAMPLE PROGRAM: Accepts two numbers and adds them together 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 ZZZ * 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 Run ENTER A NUMBER: a ANOTHER NUMBER: b THE TOTAL IS: a + b

SAMPLE PROGRAM: Takes all input records of salesperson data and writes it to an output file reformatted ID DIVISION PROGRAM-ID. SLS FILE-CONTROL SELECT SALESPERSON-FILE ASSIGN TO DISK SELECT REPORT-FILE ASSIGN TO PRINTER DATA DIVISION FILE SECTION FD SALESPERSON-FILE SALESPERSON-RECORD FILLER PIC XX SP-NUMBER PIC X(4) SP-NAME PIC X(18) FILLER PIC X(21) SP-CURRENT-SALES PIC 9(5)V SP-CURRENT-RETURNS PIC 9(4)V FD REPORT-FILE.

SAMPLE PROGRAM: Takes all input records of salesperson data and writes it to an output file reformatted REPORT-RECORD FILLER PIC X(10) RT-NUMBER PIC X(4) FILLER PIC X(6) RT-NAME PIC X(18) FILLER PIC X(6) RT-CURRENT-SALES PIC ZZ,ZZZ FILLER PIC X(6) RT-CURRENT-RETURNS PIC Z,ZZZ FILLER PIC X(65) WORKING-STORAGE SECTION WS-EOF-FLAG PIC X * PROCEDURE DIVISION * MAIN-ROUTINE OPEN INPUT SALESPERSON-FILE OUTPUT REPORT-FILE MOVE "N" TO WS-EOF-FLAG READ SALESPERSON-FILE AT END MOVE "Y" TO WS-EOF-FLAG END-READ

SAMPLE PROGRAM: Takes all input records of salesperson data and writes it to an output file reformatted * PERFORM UNTIL WS-EOF-FLAG IS EQUAL TO "Y" MOVE SPACES TO REPORT-RECORD MOVE SP-NUMBER TO RT-NUMBER MOVE SP-NAME TO RT-NAME MOVE SP-CURRENT-SALES TO RT-CURRENT-SALES MOVE SP-CURRENT-RETURNS TO RT-CURRENT-RETURNS WRITE REPORT-RECORD READ SALESPERSON-FILE AT END MOVE "Y" TO WS-EOF-FLAG END-READ END-PERFORM * CLOSE SALESPERSON-FILE, REPORT-FILE STOP RUN. Sample Run 0005 BENNETT ROBERT 1, LOCK ANDREW S PARKER JAMES E 18, REDDING OLIVIA 16, , BENTON ALEX J 3, ADAMS JUNE R 4, COLE ROBERT N 14, ,385.29

CONTRIBUTION TO COMPUTER LANGUAGE COBOL programs are in use globally in governmental and military agencies, in commercial enterprises, and on operating systems such as IBM's z/OS, Microsoft's Windows, and the POSIX families

HOW WIDELY USED IS COBOL?? -In 1997 they estimated that there were about 300 billion lines of computer code in use in the world. Of that they estimated that about 80% (240 billion lines) were in COBOL and 20% (60 billion lines) were written in all the other computer languages combined [Brown].Brown -In 1999 they reported that over 50% of all new mission- critical applications were still being done in COBOL and their recent estimates indicate that through % of all new applications (5 billion lines) will be developed in COBOL while 80% of all deployed applications will include extensions to existing legacy (usually COBOL) programs. -Gartner estimates for 2002 are that there are about two million COBOL programmers world-wide compared to about about one million Java programmers and one million C++ programmers.

RESOURCES - /cis400/cobol/cobol.htmlhttp:// /cis400/cobol/cobol.html - command=viewArticleBasic&articleId=266156&pa geNumber=1http:// command=viewArticleBasic&articleId=266156&pa geNumber=1 - m#part1http:// m#part1 Presented by: Sarunya Dechasajja