iSeries Database Files

Slides:



Advertisements
Similar presentations
3rd Annual Plex/2E Worldwide Users Conference Title text for Title or Divider pages should be either 40 pt for short titles/28 pt for subtitles or 32 pts.
Advertisements

Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Work Orders Throughout this slide show there will be hyperlinks (highlighted in blue). Follow the hyperlinks to navigate to the specified Topic or Figure.
ORDER VERIFICATION ORDER ENTRY DAILY PROCESS ORDER VERFICATION - Order Sort Browse - Enter Order # - F-8 OK.
Organisation Of Data (1) Database Theory
Session 2Introduction to Database Technology Data Types and Table Creation.
Intro to Access 2007 Lindsey Brewer CSSCR September 18, 2009.
Yong Choi School of Business CSU, Bakersfield
Microsoft Access.
Database Basics. What is Access? Database management system Computer-based equivalent of a manual database Makes it easy to organize and update information.
Database Design Week 10.
User Query Control An Enhancement For AS/400 Query On The IBM iSeries from  Copyright I/O International, 2005 Skip Intro.
SQL Rohit Khokher.
MASTER QUOTE OVERVIEW.
Stephen C. Hayne 1 Database System Components The Database and the DBMS.
Data Dictionary What does “Backordered item” mean? What does “New Customer info.” contain? How does the “account receivable report” look like?
3/5/2009Computer systems1 Analyzing System Using Data Dictionaries Computer System: 1. Data Dictionary 2. Data Dictionary Categories 3. Creating Data Dictionary.
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
Query Manager. QM is a collection of tools you can use to obtain information from the AS/400 database Used to –select, arrange, and analyze information.
ISP 121 Week 1 Introduction to Databases. ISP 121, Winter Why a database and not a spreadsheet? You have too many separate files or too much data.
Accounting Interface:
1 Intro to the AS/400 Chapter 8 - Data File Utility Copyright 1999 by Janson Industries.
Lesson 32: Designing a Relational Database. 2 Lesson Objectives After studying this lesson, you will be able to:  Identify and apply principles for good.
MS Access 2007 IT User Services - University of Delaware.
Relational Database Need to Knows. What is a database? Data - is just a pile of numbers or stats. A business "organises" the data to be meaningful and.
Introduction to Databases. Overview  What is a Database?  What is a Database Management System?  How is information organized in a database?  What.
C H A P T E R 4 Designing Database E-Commerce Hassanin M. Al-Barhamtoshy
Taught by Mohamed Kassim
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
 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.
Data Types and RunSQLSTM. Agenda Lab 1 demo this week –Bring your lab notes! Create your own Data Types Label on Authority RunSQLstm.
AS/400 Concepts & Tools. Day 1 Introduction to the AS/400 Basic Technical Concepts Programming Environment & Tools Programming Development Manager (PDM)
A comparison of tools used to define data on the System i. By Robert Berendt DDL or DDS?
User Friendly Customer Maintenance A Family of Enhancements For iSeries 400 DMAS from  Copyright I/O International, 2010, 2011 Skip Intro Exit.
Technology In Action Chapter 11 1 Databases and… Databases and their uses Database components Types of databases Database management systems Relational.
Database Management Systems.  Database management system (DBMS)  Store large collections of data  Organize the data  Becomes a data storage system.
MS Access. Access is a DBMS/RDMS DBMS = Database Management System RDMS = Relational Database Management System.
Accessing the AS/400 DATABASE Preparation for DATA storage Create a receptacle (file) internal -- in program or direct (output / crtpf) external -- with.
IBC233 Lecture 2 Updated Winter 2008 Agenda Test next Week – Jan 23 ISeries Architecture CL (Control Language) Library Lists Operations Navigator.
Week 4 presentation! This week we will cover editing and the use of the on-board tools provided, SEU and PDM.
CS 111 – Nov. 8 Databases Database Management Systems (DBMS) Structured Query Language (SQL) Commitment –Please review sections 9.1 – 9.2.
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.
Databases Flat Files & Relational Databases. Learning Objectives Describe flat files and databases. Explain the advantages that using a relational database.
Today’s Agenda Object Management Library List PDM (Programming Development Manager) SEU (Source Entry Utility)
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Welcome to IBC233 Cindy Laurin And Russ Pangborn.
Welcome to IBC233 Cindy Laurin And Russ Pangborn.
2b. Create an Access Database Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets 1.
Prepared By: Bobby Wan Microsoft Access Prepared By: Bobby Wan
How’s assignment 1 coming? Winter 2007
IBC233 Week 6.
SQL in Oracle.
Analyzing the Database and Query Manager
Database application MySQL Database and PhpMyAdmin
IBC233- iSeries Business Computing Summer 2006 Welcome!
ORACLE SQL Developer & SQLPLUS Statements
Database Fundamentals
Data Types and Field Properties
Data Types and Field Properties
Flat Files & Relational Databases
Spreadsheets, Modelling & Databases
The ultimate in data organization
Data Types and Field Properties
Data Types and Field Properties
Welcome to IBC233 Cindy Laurin.
IBC233 Week 5.
Data Types and Field Properties
Data Types and Field Properties
Presentation transcript:

iSeries Database Files Physical Files *FILE PF-DTA Logical Files *FILE LF Physical files contain actual data. Logical files show a view of a physical file (I.e. different key field and selection criteria). A logical file does not contain data. Printer files determine how a spool file will be displayed (I.e. fonts, characters per inch etc.) Display files determine how screens such as menus, information and data entry screens well look.

Physical Files It is an as/400 file used to store data or source code. Physical files have members. The members contain data or source code. Source physical files have many members eg. One for each program Data physical files usually have 1 member (but can have more)

Data Files Files, Records, Fields A file member contains one or more records A record is made up of one or more fields which give it its record format or file description Each field contains a unique piece of information e.g. student no, first name, last name, address, telephone no, etc.

Examples of Files, Records, Fields A customer file is made up of customer records (1 per customer). Each customer record has fields containing unique pieces of info about a particular customer e.g. customer name, address, sales territory,billing info, shipping instructions, credit information Student file - student records (1 per student)- student info: name, address...

More Examples of Files, Records, Fields Parts file - parts records - info about part: part number, description, warehouse location, supplier, quantity on hand, Payroll file - payroll records - payroll info for employees: employee number, name, date of hire, hourly or salary, hourly rate or annual salary, income tax info….

How do we create data physical files?

Creating Physical Data Files Creating an AS/400 data file is very similar to creating a program: Write the source code (the source code will describe what the file will look like). The source code is stored in a member in a source file. Compile the source code (this creates a *file object).

Tools for Describing Database Files Data Description Specifications (DDS) AS/400 language to create source code for Files Others: SQL (Structured Query Language), (you will do this in DB2 course) DDS is the most popular. Can use utilities SDA (screen design aid) to create DDS screen files and RLU (report layout utility) to create DDS report files.

Using DDS Source code is entered into a source physical file member in the form of DDS statements. This is done using the iSeries editor SEU The DDS statements describe each field of the record in detail e.g. field name, data type (numeric, character, packed numeric, etc), standard column headings, etc. The source file for DDS is QDDSSRC. Can edit all kinds of DDS files including screen and printer DDS files.

Example of DDS Columns . . . : 1 71 Browse DMENKEN/QDDSSRC SEU==> STUPF FMT PF .....A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++ *************** Beginning of data ************************************* 0001.00 0002.00 A R STUPFR 0003.00 A SOCINS 9S 0 COLHDG('Social' 'Insurance' 0004.00 A FNAME 15A COLHDG('First' 'Name') 0005.00 A LNAME 20A COLHDG('Last' 'Name') 0006.00 PHONE 10S COLHDG('Phone' 'No.') 0007.00 A ADDR1 25A COLHDG('Street' 'Address') 0008.00 A ADDR2 25A COLHDG('City') 0009.00 A ZIP 5S 0 COLHDG('Zip Code') ****************** End of data ****************************************

Creating a Database File Create the source file (CRTSRCPF) which is named QDDSSRC (only done once) Create a source member, type PF Enter the source code using SEU Save source code and compile to create the file Put data into the file.

The source type: tells SEU what type of source you are creating e.g. TXT, PF, LF, etc. Used for prompting and checking the syntax will tell PDM which compiler to use when creating the object.

Entering DDS code First statement is the Record Format statement. Put an R in the Name Type field and the record name in the Name field. Then enter the field info (field name, length, data type, decimal positions, standard column heading) (nothing in Name Type field)

Demo

Compiling the Source Code CRTPF command or Option 14 in PDM takes the source code and creates the object i.e. the physical file the physical file is what holds the data

How do you know if the compile worked??? DSPMSG- you will have a message which tells you whether your job completed normally or not. An output file is created with each compile (the compile listing) which tells you what happened. READ it! Where is that output file?? In your output queue!!

Question! If the compile ended abnormally, what do you do? How can you find out why?

Unique feature of iSeries Files The record description is stored with the file object (externally described file) It can then be used by iSeries utilities The record description does not have to be coded in programs that use it. Can be viewed using DSPFD, DSPFFD

Entering data If the compile was successful, you will have a new object in your library, a physical file. To enter data into that file, use DFU, Data File Utility

DFU STRDFU, then option 5 or… PDM option 18 F10 to enter new records (entry mode) F11 to change records (change mode), page up and down to find records F23 to delete a record

Viewing records RUNQRY QRYFILE(filename) DSPPFM filename