RPG Programming with Printer Files

Slides:



Advertisements
Similar presentations
Week 7! Any Questions?. Homework Work on Lab 5, Lab 6 and Lab 7.
Advertisements

CL Programming with Database Files Updated Fall 2010.
Presentation © Copyright 2002, Bryan Meyers Arithmetic and Assignment Operations Chapter 4.
Files Organisation sequential files. Readings u Schneider Chapter 8 u Shelly Cashman to 9.14; to 9.11 u Meyer to 2-37; 1995.
Programming Logic and Design Fourth Edition, Introductory
Module Meeting Management Learning Outcomes Build keyboarding skill. Format agendas. Format minutes. Format itineraries. Prepare labels and name badges.
Understanding the Mainline Logical Flow Through a Program (continued)
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
- Meeting 4 – Writing a Complete Program
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Solve for y when x = 1, 2, 3 and 4. 1.) y = x ) y = 5x 4 3.) y = 3x Solve for y when x is -2, -1, 0, 1. Patterns and Functions Day 2.
Chapter 8 Printing 1. In COBOL you send data to the printer by writing data to a file. In COBOL, the printer is defined as a file, and it is opened, closed,
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
4-1 Coding Complete COBOL Programs: The PROCEDURE DIVISION Chapter 4.
Getting Started Chapter 2 Presentation © Copyright 2002, Bryan Meyers
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.
MS Access Database Connection. Database? A database is a program that stores data and records in a structured and queryable format. The tools that are.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 6: Sequential Data Files.
Logic Structure - focus on looping Please use speaker notes for additional information!
Agenda Reporting Work on Assignment 4! Printing on power systems.
Printing on power systems Program/ Command Data Report Layout (Printer File) Job Output Queue *FILE Spooled File.
Solving systems of equations with 2 variables
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.
Stored Procedures Week 9. Test Details Stored Procedures SQL can call code written in iSeries High Level Languages –Called stored procedures SQL has.
Statement Syntax1 THE SELECT STATEMENT Purpose: designates a file and points to its physical location Syntax Definition : SELECT file-name-1 ASSIGN TO.
Any Questions? Control Breaks Agenda Control Breaks –Also known as Reports with sub-totals.
Today we will solve equations with two variables. Solve = figure out.
Pseudocode Algorithms Using Sequence, Selection, and Repetition
Welcome to RPG544. Bit about Cindy Administrative Stuff Standards Due Dates Web Page.
Table Table Table Table Table Table Table Table
1 File Processing : File Organization and File Systems 2015, Spring Pusan National University Ki-Joune Li.
Any Questions? Week 1 - 2nd Lecture Intro to COBOL Programming Defining Files and Processing Data.
At the end of each day the evening manager at each store enters a code into the cash register, after which the cash register connects to the central computer.
Module Road Map The Scope of the Problem A range of potential problems Lost Updates User A reads a record User B reads the same record User A makes changes.
Chapter 4 PROCEDURE DIVISION. Paragraphs PROCEDURE DIVISION divided into paragraphs Each is independent module or routine Made up of series of instructions.
Week 2/3 - 2nd Lecture Intro to COBOL Programming Defining Files and Processing Data.
The Functions of Operating Systems Spooling. Learning Objectives Describe spooling, explaining why it is used.
Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Be “GUI ready” developing in RPG-ILE Presented by: Robert Arce.
Files A collection of related data treated as a unit. Two types Text
Easily Modify Report Programs (because you have better things to do) Ted Holt Sr. Software Developer, Profound Logic Software Sr. Technical Editor, Four.
Input/Output Chapters 8 & 9. Character Input n Read-char reads a single character n Read-line reads until the next end-of-line –returns a string n Both.
1Copyright © 2008, Printer Working Group. All rights reserved. PWG Plenary Status Report MFD Working Group February 7, 2008 Irvine, CA PWG F2F Meeting.
Pseudocode. Algorithm A procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.
Answer: Have you ever deleted dummy color Profile? How to use SwiftColor.
Sorting in COBOL M. M. Pickard.
At the end of each day the evening manager at each store enters a code into the cash register, after which the cash register connects to the central computer.
Chapter 6: Sequential Data Files
How’s assignment 1 coming? Winter 2007
RPG Programming with Printer Files
IBC233 Week 6.
Title: More Equation Practice!
MS Access Database Connection
Any Questions?.
CSC115 Introduction to Computer Programming
Designing and Writing Control-Break Programs
Solving Two-Step Equations
Tiers vs. Layers.
Area of concern being addressed at this second SST meeting is checked here.
Agenda Collating sequence / Sorting data
Data Groupings: File File: a group of related records
Writing a Complete Program
Solving Equations with Variables on Both Sides
Solving Equations with Variables on Both Sides
2 file sequential matching with multiple records allowed on file 2
IBC233 Week 5.
Display Files Week 4.
IBC233 Lecture 3 Updated Fall 2011
Chapter 4: Writing and Designing a Complete Program
Flowchart Symbols DFD Symbols Processes Input/Output Storage
Presentation transcript:

RPG Programming with Printer Files Week 10

Agenda RPG Programming with Printer Files

SQL and RPG When defining a table, SQL doesn’t follow the rules that the record format name must be different than the table name. RPG needs the two to be different

Solve the SQL problem – F Spec change Filename: This is where you type the pf or table name FT (File Type): I O U C FD (File Designation): P R S T F (we use blank or F) FF (File Format): F E Record Length: blank or a number RAT (Record Address Type): A D F K P D Z ( we use blank or K) DEVICE: Printer, Disk, WorkStn

Solve the SQL problem – F Spec change KEYWORDS: RENAME(fileName:newRecName)

Defining a Spooled File Filename: Name of the file FT (File Type): O FD (File Designation): blank FF (File Format): E DEVICE: Printer KEYWORDS: OFLIND(*IN01)

Rounding Numbers in RPG Eval (h) Eval (h) hourlyrate = hourlyrate * 1.07;

Logic for an RPG program that creates a report for all of the records in a file

To print lines on the Report… Write recordname

Report Logic Initialize Variables

Report Logic Initialize Variables Print the report heading

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF Loop until EOF

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF Loop until EOF format the detail line

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF Loop until EOF format the detail line update the totals

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF Loop until EOF format the detail line update the totals print the detail line

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF Loop until EOF format the detail line update the totals print the detail line read the next record

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF Loop until EOF format the detail line update the totals print the detail line read the next record End of loop

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF Loop until EOF format the detail line update the totals print the detail line read the next record End of loop Print the totals

Report Logic Initialize Variables Print the report heading Read the first record and check for EOF Loop until EOF format the detail line update the totals print the detail line read the next record End of loop Print the totals End of program logic