SCOPE TERMINATORS Definition:

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

Chapter 12 Array Processing and Table Handling. Defining Series of Input Fields Coding record with 24 independent hourly fields is cumbersome 01Temp-Rec.
C++ Basics March 10th. A C++ program //if necessary include headers //#include void main() { //variable declaration //read values input from user //computation.
Review for midterm exam Dilshad M. Shahid Spring NYU.
Fortran 9x HTML version. New F90 features Free source form Modules User-defined data types and operators Generic user-defined procedures Interface blocks.
Understanding the Mainline Logical Flow Through a Program (continued)
C++ for Engineers and Scientists Third Edition
COBOL for the 21 st Century Stern, Stern, Ley Chapter 1 INTRODUCTION TO STRUCTURED PROGRAM DESIGN IN COBOL.
Fundamentals of Python: From First Programs Through Data Structures
Fundamentals of Python: First Programs
Structured COBOL Programming, Stern & Stern, 9th edition
4-1 Coding Complete COBOL Programs: The PROCEDURE DIVISION Chapter 4.
COBOL Programming DAY 2. Copyright © 2005, Infosys Technologies Ltd 2 ER/CORP/CRS/LA01/003 Version 1.0  Data Movement verbs.  Sequence Control verbs.
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.
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 5 Using Data and COBOL Operators. Initializing Variables When you define a variable in WORKING- STORAGE, you also can assign it an initial value.
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.
Chapter 7 – Editing and Coding Standards Numeric field types –Numeric –Numeric-edited Use these only for the fields you define for printing purposes.
1 Chapter 4: Selection Structures. In this chapter, you will learn about: – Selection criteria – The if-else statement – Nested if statements – The switch.
Lecture 31 Numeric Edited Alphabetic (A) AlphaNumeric (X) Numeric (9, V, S) Numeric Edited (9, Z, comma, decimal point, minus sign) –Z = zero suppressed.
1 Interactive vs Batch Programs Cobol suited for developing both types of programs Interactive programs Accept input data from keyboard Input data processed.
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.
Statement Syntax1 THE SELECT STATEMENT Purpose: designates a file and points to its physical location Syntax Definition : SELECT file-name-1 ASSIGN TO.
CPSC3111/CISM3111 COBOL Structured COBOL Programming Text: murach’s structured COBOL Authors: Murach, Prince, Menendez.
Structured COBOL Programming Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout.
Chapter 05 (Part III) Control Statements: Part II.
READING AND WRITING FILES. READING AND WRITING FILES SEQUENTIALLY  Two ways to read and write files  Sequentially and RA (Random Access  Sequential.
Khalid Rasheed Shaikh Computer Programming Theory 1.
PowerPoint Presentation: Richard H. Baum, Ph.D. DeVry Institute of Technology 9th Edition Structured COBOL Programming Nancy Stern Hofstra University Robert.
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.
Lab 2 Writing PL/SQL Blocks CISB514 Advanced Database Systems.
9/29/2005From Introduction to Oracle:SQL and PL/SQL, Oracle 1 Restricting and Sorting Data Kroenke, Chapter Two.
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.
C++ for Engineers and Scientists Second Edition Chapter 4 Selection Structures.
LOGICAL CONTROL STRUCTURES (chp. 8)
Sorting in COBOL M. M. Pickard.
1-1 Logic and Syntax A computer program is a solution to a problem.
Divisibility Rules Practice 2, 5, or 10?
Think What will be the output?
Programming in COBOL.
Additive and Multiplicative Relationships
Designing and Debugging Batch and Interactive COBOL Programs
Chapter 2 – Getting Started
Problem Solving Techniques
Any Questions?.
Chapter 3 The DATA DIVISION.
Chapter 24 (4th ed.): Creating Functions
Structured Program Design
BUSINESS LETTER TRUE OR FALSE TEST
Chapter 14 Sorting and Merging.
Scope and System Time/Date
How are your SAS Skills? Chapter 1: Accessing Data (Question # 1)
Repetition Control Structure
Chapter 6: Repetition Statements
Agenda Collating sequence / Sorting data
Computing in COBOL: The Arithmetic Verbs and Intrinsic Functions
Data Groupings: File File: a group of related records
Language Translation Issues
PL/SQL Declaring Variables.
Date Conversion Program
Y x Linear vs. Non-linear.
Language Translation Issues
Language Translation Issues
Language Translation Issues
Report Format APA.
Language Translation Issues
Presentation transcript:

SCOPE TERMINATORS Definition: For Your Information FOR THE PROCEDURE DIVISION: A period will end every “open” logical control structure currently begun. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ READ INPUT-FD AT END MOVE “yes” TO EOF PERFORM 200-CALC UNTIL EOF = “yes” MOVE INPUT-REC TO OUTPUT-REC WRITE OUTPUT-REC RULE OF THUMB: Always use END-STRUCTURE delimiters and you will only need a period at the end of every paragraph. Indentation has NOTHING to do with the logic of the program!!! Definition: Delimits the end of a logical control construct or the end of a statement with clauses. DELIMITER = a character that begins or ends a unit of data DELIMIT = to fix or define the limits of Examples: END-READ END-PERFORM END-COMPUTE (etc…) period Statement Syntax

ACCEPT DATE Purpose:  accepts current date from the computer system Syntax Definition: ACCEPT identifier FROM DATE [YYYYMMDD]. Examples: 01 TODAYS-DATE PIC 9(6). 01 TODAYS-DATE. 05 TODAYS-YR PIC 99. 05 TODAYS-MM PIC 99. 05 TODAYS-DD PIC 99. For Your Information The default format for the date is YYMMDD. If using the YYYYMMDD format option, the pic clause for todays-date is 9(8) and todays-yr is 9(4). Statement Syntax

ACCEPT TIME Purpose:  accepts current time from the computer system Syntax Definition: ACCEPT identifier FROM TIME [YYYYMMDD]. Examples: 01 TODAYS-TIME PIC 9(6). 01 TODAYS-TIME. 05 TODAYS-YR PIC 99. 05 TODAYS-MM PIC 99. 05 TODAYS-DD PIC 99. For Your Information The default format for the date is HHMMSSss. Statement Syntax