Designing and Writing Control-Break Programs

Slides:



Advertisements
Similar presentations
ORDER VERIFICATION ORDER ENTRY DAILY PROCESS ORDER VERFICATION - Order Sort Browse - Enter Order # - F-8 OK.
Advertisements

Lab 9 CIS 370 Umass Dartmouth.  A pipe is typically used as a one-way communications channel which couples one related process to another.  UNIX deals.
Programming Logic and Design Fourth Edition, Introductory
Programming Logic and Design, Second Edition, Comprehensive
Chapter 7: Control Breaks Programming Logic and Design, Third Edition Comprehensive.
Programming Logic and Design, Third Edition Comprehensive
Chapter 4 Topics –Sampling –Hard data –Workflow analysis –Archival documents.
Chapter 4 Making Decisions
General Algorithms for Common Business Problems
Chapter 13 Auditing Information Technology
- Meeting 4 – Writing a Complete Program
Introduction to Query Part 2. Query Topics Joining Files Defining Result Fields Complex Record Selection Formatting Output Creating Reports Using Multiple.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Structured COBOL Programming, Stern & Stern, 9th Edition PowerPoint Presentation: Richard H. Baum, Ph.D. DeVry Institute of Technology 9th Edition Structured.
Structured COBOL Programming Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout.
Chapter 07 Control Breaks.
10- 1 Chapter 10. To familiarize you with  Main types of computer-generated reports  Techniques used for efficient printing of group reports and control.
10-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)
Chapter 13 Sequential File Processing. Master Files Set of files used to store companies data in areas like payroll, inventory Usually processed by batch.
Break Processing Please use speaker notes for additional information!
IE 423 – Design of Decision Support Systems Database development – Relationships and Queries.
Logic Structure - focus on looping Please use speaker notes for additional information!
Printing on power systems Program/ Command Data Report Layout (Printer File) Job Output Queue *FILE Spooled File.
CS 338Query Evaluation7-1 Query Evaluation Lecture Topics Query interpretation Basic operations Costs of basic operations Examples Textbook Chapter 12.
Selection Control Structures. Simple Program Design, Fourth Edition Chapter 4 2 Objectives In this chapter you will be able to: Elaborate on the uses.
Chapter 5-1. Chapter 5-2 Chapter 5: Database Forms and Reports Introduction Forms Reports.
Chapter 5-1. Chapter 5-2 Chapter 5: Database Forms and Reports Introduction Forms Reports.
File Handling and Control Break Logic. Objectives In this chapter, you will learn about: Computer files Writing a program that reads from and/or writes.
6 Chapter 61 Looping Programming Logic and Design, Second Edition, Comprehensive 6.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 6 Looping.
13-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)
Sequential Files Chapter 13. Master Files Set of files used to store companies data in areas like payroll, inventory Set of files used to store companies.
Any Questions? Control Breaks Agenda Control Breaks –Also known as Reports with sub-totals.
General Algorithms for Common Business Problems Simple Program Design Third Edition A Step-by-Step Approach 10.
Reports and Queries Chapter 3 – Access text Reports – Page Queries – Page
Pseudocode Algorithms Using Sequence, Selection, and Repetition
5 1 Data Files CGI/Perl Programming By Diane Zak.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 8 Arrays.
Pascal Programming Today Chapter 11 1 Chapter 11.
13-1 Sequential File Processing Chapter Chapter Contents Overview of Sequential File Processing Sequential File Updating - Creating a New Master.
Databases Letts Chapter 11. A database program can be used to:  sort a file into a different order;  search through the records for a matching string.
13- 1 Chapter 13.  Overview of Sequential File Processing  Sequential File Updating - Creating a New Master File  Validity Checking in Update Procedures.
Master File Update Processing. Objectives On completing this section you should be able to: w Distinguish between online processing and batch processing.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Control Break Processing
Databases Competency Explain advanced database concepts and functions.
Chapter 11: Sequential File Merging, Matching, and Updating Programming Logic and Design, Third Edition Comprehensive.
11 Chapter 111 Sequential File Merging, Matching, and Updating Programming Logic and Design, Second Edition, Comprehensive 11.
Chapter 9 General algorithms for common business problems.
Adding Reports to a Database. Why do we use Reports? Reports are well-designed printed pages that offer several advantages: Reports are well-designed.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Edexcel OnCourse Databases Unit 9. Edexcel OnCourse Database Structure Presentation Unit 9Slide 2 What is a Database? Databases are everywhere! Student.
Sales Tax Chapter 4. PAGE REF #CHAPTER 4: Sales Tax SLIDE # 2 2 Objectives Activate and Set Sales Tax Preferences Use Sales Tax Items on Sales Forms Set.
Visual Basic - Break Processing
Processing multiple files
Sorting in COBOL M. M. Pickard.
Deposit Express New Look
Database Systems Unit 16.
Programming Logic and Design Fourth Edition, Comprehensive
Starting Out with Programming Logic & Design
For Monday Read WebCT quiz 18.
Topics Introduction to File Input and Output
Objective of This Course
Programming Logic and Design Fourth Edition, Comprehensive
Minor, Intermediate and Major Breaks
Iteration: Beyond the Basic PERFORM
For Wednesday No new reading No quiz.
Lesson 24 Managing and Reporting Database Information
2 file sequential matching with multiple records allowed on file 2
Topics Introduction to File Input and Output
Presentation transcript:

Designing and Writing Control-Break Programs Chapter 10 Designing and Writing Control-Break Programs

Types of Reports Detail or Transaction Reports Exception Reports Include one or more lines of output for each input record read Exception Reports Printout of individual records that meet (or fail to meet) certain criteria Summary Reports Summarizes rather than itemizes to provide more comprehensive information

Topics Single-Level Control-Break Programs Sequence of input records is important Data is sorted on the control-break field Multiple-level Control-Break Programs Input data is sorted on two or more fields Control-Break is Similar to Page Breaks

Control-Break Processing The input data must be sorted (Note: Chapter 13 covers detail of how your program can sort a file) For now, we will assume the input file is already sorted (i.e., Sales Rep Number) It could be sorted on two or three fields

Processing Logic Loop until EOF Print Ctrl-break Totals Read record If First-Record Set the Saved-Ctrl-Nbr If Ctrl-Nbr not equal Saved-Ctrl-Nbr Print Ctrl-break totals Reset Ctrl-break totals Set the Saved-Ctrl-Nbr Process record Print Ctrl-break Totals

Processing Logic When the “Next Record” does not match the Saved Control Number Print the control-break total Reset accumulators Don’t forget about page break processing Two types of Print Lines: Detail Line Control-break Total Line At EOF, print last Control-break Total

Complex Programs Suppose there are two, or even three, control fields The input file must be sorted on all fields (sorted in the proper sequence) Sub-totals for each control-break

Complex Programs Input Data: State, Branch, Sales Rep Number, other data AR 01 001 ... AR 01 001 ... AR 01 002 ... AR 02 002 ... AR 03 001 ... AR 03 004 ... KY 02 002 ... KY 02 003 ... KY 02 003 ... KY 03 001 ... KY 03 002 ... KY 04 008 ... KY 04 010 ...