Module 1 1. Cobol Hierarchy Revised on 2011. 1. COBOL Hierarchy There are four DIVISIONS:- IDENTIFICATION DIVISION. ENVIRONMENT DIVISION. DATA DIVISION.

Slides:



Advertisements
Similar presentations
DT266/2 Information Systems COBOL Revision. Chapters 1 & 2 Hutty & Spence Divisions of a Cobol Program Identification Division Program-ID. Environment.
Advertisements

DT266/2 COBOL Basics – Declaring Data Basic Operations.
1 Introduction to VHDL (Continued) EE19D. 2 Basic elements of a VHDL Model Package Declaration ENTITY (interface description) ARCHITECTURE (functionality)
2-1 Chapter 2.  Coding Requirements of IDENTIFICATION DIVISION  Sections of ENVIRONMENT DIVISION  Assigning Files to Devices in ENVIRONMENT DIVISION.
- 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.
The IDENTIFICATION and ENVIRONMENT DIVISIONS Chapter 2.
COBOL for the 21 st Century Stern, Stern, Ley Chapter 1 INTRODUCTION TO STRUCTURED PROGRAM DESIGN IN COBOL.
COBOL COmmon Business Oriented Language  Work began in 1959 and has never stopped.
Chapter 3 Planning Your Solution
1.4-5: Multiplying Integers: Basic Rules. Ways to Express multiplication Remember: All of these mean the same thing: Five times four 5 × 4 5 · 4 5(4)
COBOL for the 21st Century
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
COBOL Basics 1. COBOL coding rules  Almost all COBOL compilers treat a line of COBOL code as if it contained two distinct areas. These are known as;
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.
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.
INTRODUCTION TO ALGORITHMS PROGRAMMING. Objectives Give a definition of the term algorithm Describe the various parts of the pseudocode algorithm or algorithm.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
Programming Examples to Accompany Structure Topic Please use speaker notes for additional information!
Totals on the Screen Please use speaker notes for additional information!
Programming With C.
UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/ Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM.
Module 4 Constants Copy Statement Perform Verb Part 1.
1 Interactive vs Batch Programs Cobol suited for developing both types of programs Interactive programs Accept input data from keyboard Input data processed.
COBOL Basics 2. H E N N E S S Y R M L M F Group Items/Records StudentDetails WORKING-STORAGE SECTION. 01StudentDetailsPIC X(26).
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.
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.
Introduction to programming in the Java programming language.
CPSC3111/CISM3111 COBOL Structured COBOL Programming Text: murach’s structured COBOL Authors: Murach, Prince, Menendez.
Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 3 Variables, Constants, Methods, and Calculations.
1 IDENTIFICATION and ENVIRONMENT DIVISIONS. 2 Objectives Basic Structure of COBOL Programs General Coding and Formatting Rules Identification and the.
Chapter 3 Decision Making. What is IF? The primary method of changing the flow of a program is by making decisions using the IF verb. The following example.
OO-Cobol. Moving between MVS and UNIX From MVS, use a TSO command to start a UNIX shell: TSO OMVS Or TSO ISHELL From UNIX, use the exit command to return.
Structured Programming
COBOL Screens Please use speaker notes for additional information!
Structured COBOL Programming, Stern & Stern, 9th Edition CHAPTER 2 Cobol Language Fundamentals.
1 Chapter 5 – The Procedure Division File handling statements –OPEN statement Initiates processing for a file Input Output Each file opened must have been.
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.
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.
IBM-Mainframes COBOL Class-1. Background and History  COBOL is an acronym for: Common Business Oriented Language  COBOL was developed in 1959 by the.
Analysis of SAMPLE1.CBL Please check speaker notes for additional information!
Chapter 4 PROCEDURE DIVISION. Paragraphs PROCEDURE DIVISION divided into paragraphs Each is independent module or routine Made up of series of instructions.
The PERFORM. The PERFORM Verb  Iteration is an important programming construct. We use iteration when we need to repeat the same instructions over and.
 2007 Pearson Education, Inc. All rights reserved. A Simple C Program 1 /* ************************************************* *** Program: hello_world.
Invent Your Own Computer Games with Python
Week 2/3 - 2nd Lecture Intro to COBOL Programming Defining Files and Processing Data.
371 Structured COBOL Programming Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout John.
Random update Please use speaker notes for additional information!
Lab 2 Writing PL/SQL Blocks CISB514 Advanced Database Systems.
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.
Submitting Instructions on web site CS 1024 students Read guide
Structured Programming
Programming in COBOL.
Designing and Debugging Batch and Interactive COBOL Programs
An Introduction to Structured Program Design in COBOL
Chapter 14 Sorting and Merging.
Programming in COBOL-85 For IBM Mainframe System 390
CHAPTER 17 The Report Writer Module
Using screens and adding two numbers - addda.cbl
Programming in COBOL.
Presentation transcript:

Module 1 1. Cobol Hierarchy Revised on 2011

1. COBOL Hierarchy There are four DIVISIONS:- IDENTIFICATION DIVISION. ENVIRONMENT DIVISION. DATA DIVISION. PROCEDURE DIVISION. If the division is not used, the division header need not to be specified. The last two division, namely DATA DIVISION and PROCEDURE DIVISION will comprise 95% of a program.

1. COBOL Hierarchy IDENTIFICATION DIVISION (Program Identification). Serve a single purpose, the division header is mandatory according to the ISO standard but optional under Net Express. ENVIRONMENT DIVISION (Operating Environment). Serve to identify the environment in which program will operate. Files which the program will use from part of the operating environment and will therefore be specified in this division. DATA DIVISION (Data Descriptions). All the data that the program uses will be defined in this division. PROCEDURE DIVISION (Algorithm Descriptions). All the instruction that will manipulate the data reside in this division.

1. COBOL Hierarchy IDENTIFICATION DIVISION (Program Identification) Syntax. The IDENTIFICATION DIVISION has the following structure:- IDENTIFICATION DIVISION.Represent the division header and signal the commencement of the program text. PROGRAM-ID. NameOfProgram.Is a keyword. It must be specified immediately after the division header. The program name can be up to 30 characters long. [AUTHOR. YourName.]

1. COBOL Hierarchy IDENTIFICATION DIVISION (Program Identification) Syntax. Example:- IDENTIFICATION DIVISION. PROGRAM-ID. SequenceProgram. AUTHOR. Alan Cheah Kah Hoe

1. COBOL Hierarchy ENVIRONMENT DIVISION (Operating Environment) Syntax. The ENVIRONMENT DIVISION is divided into two main sections:- 1. CONFIGURATION SECTION. 2. INPUT-OUTPUT SECTION - Is used to specify the file environment in which the program is to function.  A file is specified using the select statement.  There will be a select statement for each file used in the program.

1. COBOL Hierarchy DATA DIVISION (Data Descriptions) Syntax. The DATA DIVISION has the following structure:- DATA DIVISION.Represent the division header and signal the commencement of the program text. FILE SECTION. File Section entries.Is a keyword. It must be specified immediately after the division header. The program name can be up to 30 characters long. WORKING-STORAGE SECTION. WS entries.

1. COBOL Hierarchy DATA DIVISION (Data Descriptions) Syntax. Example:- IDENTIFICATION DIVISION. PROGRAM-ID. SequenceProgram. AUTHOR. Fosha Sondha. DATA DIVISION. WORKING-STORAGE SECTION. 01 Num1PIC 9VALUE ZEROS. 01 Num2PIC 9VALUE ZEROS. 01 ResultPIC 99VALUE ZEROS.

1. COBOL Hierarchy PROCEDURE DIVISION (Algorithm Descriptions) Syntax. The PROCEDURE DIVISION is where all the data described in the DATA DIVISION is produced and being processed. Besides, this is where the programmer describes his algorithm. The PROCEDURE DIVISION is hierarchical in structure and consists of:-  Sections sections is optional.  Paragraphs  Sentences at least one.  Statements In PROCEDURE DIVISION paragraph and section names are chosen by the programmer. The names used should reflect the processing being done in the paragraph or section.

1. COBOL Hierarchy PROCEDURE DIVISION (Algorithm Descriptions) Syntax. Example:- IDENTIFICATION DIVISION. PROGRAM-ID. SequenceProgram. AUTHOR. Fosha Sondha. DATA DIVISION. WORKING-STORAGE SECTION. 01 Num1PIC 9VALUE ZEROS. 01 Num2PIC 9VALUE ZEROS. 01 ResultPIC 99VALUE ZEROS. PROCEDURE DIVISION. CalculateResult. ACCEPT Num1. ACCEPT Num2. MULTIPLY Num1 BY Num2 GIVING Result. DISPLAY “Result is = “, Result. STOP RUN.

Lab Exercise 1 How to display “Hello World”? How do you start a new program in Net Express? Please try it yourself first before I show you the correct program.