IBM-Mainframes COBOL Class-1. Background and History  COBOL is an acronym for: Common Business Oriented Language  COBOL was developed in 1959 by the.

Slides:



Advertisements
Similar presentations
DT266/2 COBOL Basics – Declaring Data Basic Operations.
Advertisements

2-1 Chapter 2.  Coding Requirements of IDENTIFICATION DIVISION  Sections of ENVIRONMENT DIVISION  Assigning Files to Devices in ENVIRONMENT DIVISION.
COBOL LANGUAGE COmmon Business Oriented Language Sarunya Dechasajja
Chapter 1: Introduction
- Kav Shrestha.  Introduction  History  Features  COBOL Usage  Characteristics  Structure of COBOL Programs  COBOL Divisions  Data Items  Variable.
The IDENTIFICATION and ENVIRONMENT DIVISIONS Chapter 2.
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 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 COmmon Business Oriented Language  Work began in 1959 and has never stopped.
PowerPoint Presentation: Richard H. Baum, Ph.D. DeVry Institute of Technology 9th Edition Structured COBOL Programming Nancy Stern Hofstra University Robert.
Introduction to C++ - How C++ Evolved Most popular languages currently: COBOL, Fortran, C, C++, Java (script) C was developed in 1970s at AT&T (Richie)
Structured COBOL Programming, Stern & Stern, 9th edition
4-1 Coding Complete COBOL Programs: The PROCEDURE DIVISION Chapter 4.
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)
Programming in COBOL-85 For IBM Mainframe System 390
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)
2-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.
Introduction to COBOL. COBOL  COBOL is an acronym which stands for Common Business Oriented Language.  The name indicates the target area of COBOL applications.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
History COBOL (Common Business Oriented Language) was one of the earliest high-level programming languages. COBOL was first proposed in 1959 by the Conference.
Introduction of C++ language. C++ Predecessors Early high level languages or programming languages were written to address a particular kind of computing.
PowerPoint Presentation: Richard H. Baum, Ph.D. DeVry Institute of Technology 9th Edition Structured COBOL Programming Nancy Stern Hofstra University Robert.
Programming Examples to Accompany Structure Topic Please use speaker notes for additional information!
History of C 1950 – FORTRAN (Formula Translator) 1959 – COBOL (Common Business Oriented Language) 1971 – Pascal Between Ada.
UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/ Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM.
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 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
/* Documentations */ Pre process / Linking statements Global declarations; main( ) { Local Declarations; Program statements / Executable statements; }
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.
Programming Fundamentals. Today’s Lecture Why do we need Object Oriented Language C++ and C Basics of a typical C++ Environment Basic Program Construction.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
CPSC3111/CISM3111 COBOL Structured COBOL Programming Text: murach’s structured COBOL Authors: Murach, Prince, Menendez.
CS CS CS IA: Procedural Programming CS IB: Object-Oriented Programming.
1 IDENTIFICATION and ENVIRONMENT DIVISIONS. 2 Objectives Basic Structure of COBOL Programs General Coding and Formatting Rules Identification and the.
Structured Programming
COmmon Business Oriented Language
Structured COBOL Programming, Stern & Stern, 9th Edition CHAPTER 2 Cobol Language Fundamentals.
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.
2-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.  Introduction  The Benefits of the Report Writer Module ◦ For Detail and Summary Printing ◦ For Control Break Processing ◦ For Printing Headings.
CSC1200 INTRODUCTION TO PROGRAMMING Dr. Maureen Markel
Module 1 1. Cobol Hierarchy Revised on COBOL Hierarchy There are four DIVISIONS:- IDENTIFICATION DIVISION. ENVIRONMENT DIVISION. DATA DIVISION.
Any Questions? Week 1 - 2nd Lecture Intro to COBOL Programming Defining Files and Processing Data.
Analysis of SAMPLE1.CBL Please check speaker notes for additional information!
Learners Support Publications Introduction to C++
Introducing Java Chapter 3 Review. Why Program in Java? Java, is an object-oriented programming language. OOP languages evolved out of the need to better.
Invent Your Own Computer Games with Python
Week 2/3 - 2nd Lecture Intro to COBOL Programming Defining Files and Processing Data.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
An overview of C Language. Overview of C C language is a general purpose and structured programming language developed by 'Dennis Ritchie' at AT &T's.
371 Structured COBOL Programming Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout John.
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.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
16- 1 Chapter 16.  To familiarize you with  COPY statement for copying parts of a program stored in a library  CALL statement for executing called.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
Computer Programming - Key Concepts and Terms Computer Program – A computer program is a set of instructions for computer, arranged in logical order, using.
Programming what is C++
C Programming Hardik H. Maheta.
Structured Programming
History of ‘C’ Root of the morden language is ALGOL It’s first
Programming in COBOL.
Designing and Debugging Batch and Interactive COBOL Programs
An Introduction to Structured Program Design in COBOL
Programming in COBOL-85 For IBM Mainframe System 390
Programming in COBOL.
Presentation transcript:

IBM-Mainframes COBOL Class-1

Background and History  COBOL is an acronym for: Common Business Oriented Language  COBOL was developed in 1959 by the Conference on Data Systems Languages (CODASYL).  COBOL was designed to solve business problems  COBOL was designed to be English-like, so that the reader, even a non-programmer, could get an idea of what was going on in the program, simply by reading the code.  COBOL was designed to be portable, so that programs could be adapted from one computer system to run on another, simply by making a few changes in one isolated section of the code.

Background and History Contd..  Since 1960, the American National Standards Institute (ANSI) was responsible for developing new COBOL standards.  Three ANSI standards for COBOL have been produced:  in 1968, 1974 and 1985 (currently Using ).  Object-oriented COBOL is the fourth edition in the continuing evolution of ANSI/ISO standard COBOL.

Structure of COBOL Program  The organization of a COBOL program is hierarchical. It's not necessarily required for all of components to be present for the hierarchical relationship to exist.. Program.. Division.. Section.. Paragraph.. Sentence.. Statement.. Clause / Phrase / VERBS.. Word (.. Character)

COBOL Program Organization (Division)  We have four divisions in every COBOL program IDENTIFICATION, ENVIRONMENT,DATA, and PROCEDURE.  IDENTIFICATION DIVISION The first division of COBOL program; used for documentation purposes.  PROGRAM-ID is used to name the program. This is the only paragraph that is required in the ID DIVISION.  AUTHOR used to code the programmer's name  INSTALLATION used to code the programmer's employer's name  DATE-WRITTEN & DATE-COMPILED used to code the date the program was written & compiled  SECURITY used to code the security level of the program

Division’s Contd..  ENVIRONMENT DIVISION Provides information on the equipment and file used with the program and only division that may be machine- dependent.  Two sections: CONFIGURATION and INPUT-OUTPUT Section  CONFIGURATION SECTION optional section is used to specify the type of computer equipment SOURCE-COMPUTER used to compile the program. OBJECT-COMPUTER used to execute the program.  INPUT-OUTPUT SECTION used to specify input/output files used in the program. FILE-CONTROL used to associate the files to be used in the program with specific I/O devices.

Division’s Contd..  DATA DIVISION : Defines and describes all the data to be used in a program/To declare variables.  Sections: FILE, WORKING-STORAGE, LINKAGE, REPORT, and COMMUNICATION SECTIONS  FILE SECTION is used to define the files record layout that will be used in the program.  WORKING-STORAGE is used to define any data that will be used in the program that is not part of a file section.  LINKAGE SECTION is used in a subprogram to define data that will be passed as arguments to the routine.  REPORT SECTION can be used to produce standard control break driven reports. COMMUNICATION SECTION is used for communicating between two programs running simultaneously on a computer

Division’s Contd..  PROCEDURE DIVISION This contains the instruction to be executed in the program  This division consists of a series of procedures called paragraphs, each designed to perform a specific function.  Paragraph Consists of a paragraph name and a series of procedural statements designed to perform a desired function.  Statement : An instruction.  Sentence : A statement or series of statement ending with a period (.)  STOP RUN : Specifies end of the program.

COBOL Layout/COBOL Code Sheet (1 - 80) Sequence Number This area was originally designed for entering line numbers on each individual line of code Comments /Continuation This area is used to designate a line as either a comment or a continuation for previous line code. *This line is a comment. - This line is a continuation of the previous line Area A This area is used to enter division headers, section headers, paragraph names, file indicators and level 01 items Area B This area is used to enter any statement that doesn't go in Area A Program Identification This area has been used by programmers as a way to mark individual lines of code,

My First COBOL Program  Hello world! Program IDENTIFICATION DIVISION. ( ID DIVISION ) PROGRAM-ID. HELLOPGM. -  Max 8 character ENVIRONMENT DIVISION. DATA DIVISION. PROCRDURE DIVISION. DISPLAY ‘HELLO WORLD!’. STOP RUN. This Program gives HELLO WORLD! As Output.

Thank You