CL Programming with Database Files Updated Fall 2010.

Slides:



Advertisements
Similar presentations
Introduction to ReportSmith and Effective Dated Tables
Advertisements

A Level Computing#BristolMet Session Objectives#U2 S2 MUST describe the steps of an algorithm using a program flowchart SHOULD explain the data types and.
CL programming (with Display Files). Review Display Files Constants Input/Output fields Attributes Activating Function keys.
Advanced RPG Chapter 8 Interactive Applicatons. Interactive Applications  Batch Processing: Program is run without human intervention or control.  Interactive.
Week 7! Any Questions?. Homework Work on Lab 5, Lab 6 and Lab 7.
Accounts Payable–1099 Processing 1Freedom Systems – Accounts Payable – 1099 Processing WELCOME TO THE ACCOUNTS PAYABLE – 1099 PROCESSING WEBINAR WE WILL.
Files  File organisation and usage A record is a group of logically related fields A file is a group of logically related records Files are used to store.
Function Point Analysis example. Function point FP is defined as one end-user business function FPA evaluates the system from a user perspective.
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
IS 1181 IS 118 Introduction to Development Tools VB Chapter 06.
S A B D C T = 0 S gets message from above and sends messages to A, C and D S.
Guide To UNIX Using Linux Third Edition
Chapter 8: I/O Streams and Data Files. In this chapter, you will learn about: – I/O file stream objects and functions – Reading and writing character-based.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
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,
DCT 1123 Problem Solving & Algorithms
Any Questions!. Agenda Fun with Functions –how to get the system date Condition Names INDARA and SI Iteration Logical Files Positioning the file pointer.
Notes Assignment #1 is due next Friday by 11:59 pm via Test #1 will be held Thursday February 18 at the start of class (one period long) Format:
 Definition  Components  Advantages  Limitations Contents  DBMS DBMS  Functions Functions  Architecture Architecture.
DATABASE. A database is collection of information that is organized so that it can easily be accessed, managed and updated. It is also the collection.
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
Guide To UNIX Using Linux Fourth Edition
Mid-West Tri State Users Group Meeting Agenda l Overview of Event, Condition, Action (ECA) l What’s new in release 7.0 l Designing effective workflows.
Presentation © Copyright 2002, Bryan Meyers Externally Described Files Chapter 6.
Nasca Access BasicsMore Access Access Again Access Continued Access Leftovers.
Functional Modeling Question How do you know if you have enough information to compute the necessary output values? How do you know if you have.
Exploring Microsoft Access 2003 Chapter 2 Tables and Forms: Design, Properties, Views, and Wizards.
Central Processing Unit
© Logicalis Group Using DB2/400 effectively. Data integrity facilities Traditional iSeries database usage Applications are responsible for data integrity.
Printing on power systems Program/ Command Data Report Layout (Printer File) Job Output Queue *FILE Spooled File.
Analyzing Data Using Access. Creating a new database To create a new database 1.Start Access. In the Task Pane, click Blank Database. 2.The File New Database.
Set path vs current schema. Set Current Schema ‘The CURRENT SCHEMA special register specifies a VARCHAR(128) value that identifies the schema name used.
Indexed and Relative File Processing
Lesson Overview 3.1 Components of the DBMS 3.1 Components of the DBMS 3.2 Components of The Database Application 3.2 Components of The Database Application.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Parts of a Computer - Introduction
Welcome to RPG544. Bit about Cindy Administrative Stuff Standards Due Dates Web Page.
IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator.
5 1 Data Files CGI/Perl Programming By Diane Zak.
DBT544. DB2/400 Advanced Features Level Check Considerations Database Constraints File Overrides Object and Record Locks Trigger Programs.
File and Database Design Class 22. File and database design: 1. Choosing the storage format for each attribute from the logical data model. 2. Grouping.
Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM.
Verification & Validation. Batch processing In a batch processing system, documents such as sales orders are collected into batches of typically 50 documents.
Any Questions!. Agenda Fun with Functions –how to get the system date –How to get the next service date INDARA and SI Condition Names Iteration Logical.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Agenda Positional Parameters / Continued... Command Substitution Bourne Shell / Bash Shell / Korn Shell Mathematical Expressions Bourne Shell / Bash Shell.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
1 Week # 4 Introduction to PDM PDM is a workbench environment that lets programmers and system operators navigate the three levels of the AS/400’s object-based.
Any Questions!. Agenda Fun with Functions Externally Described Files Condition Names Iteration Logical Files Random Reads.
HNC Flow Chart 1 IT Systems Analysis and Design SSADM – Design.
Files A collection of related data treated as a unit. Two types Text
LO: We’re learning to outline a program using Pseudo Code.
National Diploma Unit 4 Introduction to Software Development Input and output processing.
Computer Science & Engineering 2111 Database Objects 1 CSE 2111 Introduction to Database Management Systems.
File Operations. FILE PROCESSING For the purposes of the following discussion, reading means copying all or part of an existing file into memory Writing.
CL Programming with Database Files Updated Summer 2007.
Identify internal hardware devices (e. g
Creating professional PDF documents from basic Spool Files, utilising report definitions, maps and dynamic use of images. (CVTSPLDBF & CVTSPLPDF)
RPG Programming with Printer Files
IBC233 Week 6.
IBM AS 400 online Training in Hyderabad
RPG Programming with Printer Files
Agenda Test next Week! SI or no SI? File Update Techniques – Review.
Week 4 Updated Winter 2011.
Process Description and Control
Data Groupings: File File: a group of related records
IBC233 Week 5.
Display Files Week 4.
CL programming (with Display Files)
Presentation transcript:

CL Programming with Database Files Updated Fall 2010

Agenda CL programming with Database Objects RPG Programming with Database Objects

Physical Files Store Data Have record formats Can have keys (access paths) Created using DDS Code or SQL

Logical Files Do not store data –Stores key fields and record addresses Another view of the data Created using DDS Code or SQL

CL Programming with Database Objects

CL Programming Restrictions Only five *FILE per program –Display file or Database File Can’t update Database Files Can’t create reports

File Commands DCLF - Declares a File e.g. DCLF FILE(STUDENTS) RCVF - Reads a record from a screen or database file SNDRCVF is used only with display files, NOT database files! SNDPGMMSG – Send Program Message –Sends a message to the calling program

Example Write a CL program which reads the student file, calculates the total Feesowed and total Finesowed displays it to the user.

Pseudo Code Initialize variables Receive information Do while not end of file Update account balance total Receive information End of file: format the message to display the total account balance

Monitoring for messages When something unusual happens, the system sends a message back to the program. It is up to the program to ‘trap’ the message if necessary and take the appropriate action. e.g. an end-of-file condition (msg CPF0864)

Monitor Message Example RCVF MONMSG MSGID(CPF0864) + EXEC(GOTO CMDLBL(ENDIT))

RPG Programming with Database Objects

FSPEC Review File name – name of file File Type – C for a Display file I, U, or O for Database Objects O, for Printer Files (reports) File Format – E for Externally Described Record Address Type – K if the object has a sort Device – Disk for Database Object Workstn for display files Printer for reports

RPG Verbs and Functions Read filename; –reads a record from a database object %EOF(filename) –Checks for End of File

Programming tasks Create a display file that uses all of the fields from the Student file. All of the fields should be output only. Feesowed and Finesowed should have the attribute Reverse Image (RI) conditioned by an indicator Write an RPG program that displays each record in the Student file using the above display file. Feesowed and Finesowed should be displayed in Reverse Image if they are greater than zero.

Pseudo Code Initialize variables Receive information Do while not end of file Display the screen Receive information End of file: exit program