Welcome to RPG544. Bit about Cindy Administrative Stuff Standards Due Dates Web Page.

Slides:



Advertisements
Similar presentations
Slide C.1 SAS MathematicalMarketing Appendix C: SAS Software Uses of SAS  CRM  datamining  data warehousing  linear programming  forecasting  econometrics.
Advertisements

Input and Output READ WRITE OPEN. FORMAT statement Format statements allow you to control how data are read or written. Some simple examples: Int=2; real=
Advanced RPG Chapter 8 Interactive Applicatons. Interactive Applications  Batch Processing: Program is run without human intervention or control.  Interactive.
2-1 Chapter 2.  Coding Requirements of IDENTIFICATION DIVISION  Sections of ENVIRONMENT DIVISION  Assigning Files to Devices in ENVIRONMENT DIVISION.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Week 7! Any Questions?. Homework Work on Lab 5, Lab 6 and Lab 7.
CL Programming with Database Files Updated Fall 2010.
Presentation © Copyright 2002, Bryan Meyers Arithmetic and Assignment Operations Chapter 4.
 Lex helps to specify lexical analyzers by specifying regular expression  i/p notation for lex tool is lex language and the tool itself is refered to.
 2005 Pearson Education, Inc. All rights reserved Introduction.
Data Dictionary What does “Backordered item” mean? What does “New Customer info.” contain? How does the “account receivable report” look like?
Programming Logic and Design Fourth Edition, Introductory
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
Modules, Hierarchy Charts, and Documentation
Programming Logic and Design, Introductory, Fourth Edition1 Understanding Computer Components and Operations (continued) A program must be free of syntax.
CHAPTER 6 FILE PROCESSING. 2 Introduction  The most convenient way to process involving large data sets is to store them into a file for later processing.
Microsoft Access 2000 Creating Tables and Relationships.
Access Lesson 2 Creating a Database
Presentation © Copyright 2002, Bryan Meyers Defining Data with Definition Specifications Chapter 3.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
Getting Started Chapter 2 Presentation © Copyright 2002, Bryan Meyers
IS 320 Notes for Chapter 8. ClassX Problems: Low-Tech Fix Use last year's videos on ClassX  Select "Semesters" tab  Select IS 320  Select the week/lecture.
Chapter 13 Sequential File Processing. Master Files Set of files used to store companies data in areas like payroll, inventory Usually processed by batch.
Dr Masri Ayob TK 2633: Microprocessor & Interfacing Lecture 7: Assembly Language.
 A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. What is Database?
Presentation © Copyright 2002, Bryan Meyers Externally Described Files Chapter 6.
Microsoft Access – Tutorial 2 Designing Databases In this tutorial, we will create a new database create a new table import tables from an existing database.
Presentation © Copyright 2002, Bryan Meyers Top-Down, Structured Program Design Chapter 5.
Printing on power systems Program/ Command Data Report Layout (Printer File) Job Output Queue *FILE Spooled File.
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.
Indexed and Relative File Processing
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
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.
CPSC3111/CISM3111 COBOL Structured COBOL Programming Text: murach’s structured COBOL Authors: Murach, Prince, Menendez.
Database Management Systems.  Database management system (DBMS)  Store large collections of data  Organize the data  Becomes a data storage system.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Relational Databases. Relational database  data stored in tables  must put data into the correct tables  define relationship between tables  primary.
Structured COBOL Programming, Stern & Stern, 9th Edition CHAPTER 2 Cobol Language Fundamentals.
Presentation © Copyright 2002, Bryan Meyers Introduction to Programming and RPG Chapter 1.
13-1 Sequential File Processing Chapter Chapter Contents Overview of Sequential File Processing Sequential File Updating - Creating a New Master.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
The Role of Lexical Analyzer
V6R1 – RPG enhancements THREAD(*CONCURRENT) Ability to define a main procedure which does not use the RPG cycle Files defined in subprocedures Qualified.
Introduction ABAP Fields and Variables. Slide 2 Fields (Introduction) In ABAP, fields (or data objects) are named locations in memory Variables store.
Week 2/3 - 2nd Lecture Intro to COBOL Programming Defining Files and Processing Data.
RPG free basics Session 1. RPG free Session 12 “C” Spec structure change Fixed Format Structure Factor 1OPCODEFactor 2Result Num1AddNum2Num3 EvalNum3=Num1+Num2.
Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Be “GUI ready” developing in RPG-ILE Presented by: Robert Arce.
CHAPTER 1 COMPUTER SCIENCE II. HISTORY OF COMPUTERS (1.1) Eniac- one of the worlds first computers Used more electricity than an entire city block of.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
The purpose of a CPU is to process data Custom written software is created for a user to meet exact purpose Off the shelf software is developed by a software.
How’s assignment 1 coming? Winter 2007
RPG Programming with Printer Files
IBC233 Week 6.
Structured Programming
IBM AS 400 online Training in Hyderabad
RPG Programming with Printer Files
ORACLE SQL Developer & SQLPLUS Statements
Designing and Debugging Batch and Interactive COBOL Programs
Chapter 3 The DATA DIVISION.
First Python Program Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An.
Agenda Collating sequence / Sorting data
Data Groupings: File File: a group of related records
Introduction to C Programming
Week 10 FILE PROCESSING.
Procedures.
IBC233 Week 5.
IBC233 Lecture 3 Updated Fall 2011
SQL (Structured Query Language)
Chapter 4 The Von Neumann Model
SIMSCRIPT SIMSCRIPT is a general-purpose simulation language
Presentation transcript:

Welcome to RPG544

Bit about Cindy

Administrative Stuff Standards Due Dates Web Page

RPG IV R – Report P – Program G – Generator Version 4

History of RPG 1964: RPG - Report Program Generator 1969: RPG II –With release of System/3 1979: RPG III –Interactive programming –Database –Structured Programming 1988: RPG/400 –Upgrade to RPG III 1994: RPG IV –Integrated Language Environment (ILE) –Modular Programming

Things that made RPG unique Program Cycle Read a record Loop until Eof process the record read a record End of loop Indicators

Specifications Programs are organized in a series of specifications and appear in this order Spec TypeDescriptionWhen Introduced HHeader (control)RPG FFileRPG DDefinitionRPG IV IInputRPG CCalculationRPG OOutputRPG PProcedureRPG IV

H-Specs (Control Specifications) Default formats (eg. Date formats) Changes to normal processing modes –Eg changing the internal method that the program uses to evaluate expressions Special options to use when compiling the program Language enhancements that effect the entire program H Datfmt(*ISO) Timfmt(*HMS)

F-Specs PositionUsePositionUse 7-16File Name23-27Record Length For program described 17File Type (I, U, or O) 36-49Device Disk, Printer, Workstation 18File Designation Blank – output file F – Full Procedural P – Primary File (logic cycle) S – Secondary File (logic Cycle) R – Record address file T – Table 44-80Keywords (see appendix A of text book) 22File Format F – Program Described E – Externally Described

D-Specs (Definition) Standalone variables Named constants Data Structures Prototypes Procedure Interfaces

D-Specs Data name –15 characters –Must start with a letter of the alphabet or $, # –Remaining characters must be letters, numbers, _, #, $ Declaration Type –DS – Data Structure –C – Constant –PR – Procedure –PI – Procedure Interface –S – Standalone Variable

D-Specs Length –Length of Data Decimal Places –Number of decimal places Data type

I-Specs (Field Definition) Used to define fields in the file PosUsePosUse 7 – 16Filename36Data Type 17 – 18Sequence NS – if no sequence required 2 digit number if sequence is required 37 – 46Field Location 19Number Leave blank 47 – 48Decimal Positions Required by numeric fields 20Option Leave blank 49 – 62Field Name 6 characters up to RPGIII 14 characters RPG IV 21 – 22Record id (indicator)

C-Specs (Calculation) Program logic! Factor1 Opcode Factor2 Result Indicators RPG IV introduces free form RPG for C- Specs

O-Specs (Output) Define the output of the program. May be report definitions or database. PosUsePosUse 7-16FileName Field Names 17Type D-Detail H-Header E-Exception T-Total 53 – 80Constants / Edit Word 30 – 39Exception Name47 – 51End Position 40 – 45Skip and Space Entries52Edit code

P-Specs Will discuss later in the course

Add qty1addqty2qty3 or addqtyqty3

Sub qty1subqty2diff or subqtydiff

Mult pricemultqtysales or mult 0.14sales

Div salesdivqtyprice or div qtysales

Read Reads the next record from a database object (sequential read) readsales99 will ‘turn on’ indicator 99 if the end of file is reached.

EXCPT (EXCEPT) Writes output to printer files excpt format

IF RPG, RPGII, RPGIII –IFEQ, IFNE, IFLE, IFLT, IFGT, IFGE, etc –Ends with endif qtyifeq 0 endif RPGIV free format –If –Ends with endif If qty = 0; Endif;

Do Loops RPG, RPGII, RPGIII –DOWEQ, DOWNE, DOUEQ, DOUNE etc –Ends with ENDDO Qty Doweq 0 enddo RPGIV free format –DOW, DOU –Ends with ENDDO Dow qty < 0; enddo;

Itempgm Demo