Académique Documents
Professionnel Documents
Culture Documents
iSeries Database
DB2 UDB is the database Integrated with OS Relational database with Referential Integrity Database file types Interfaces to access files
Database Files
An iSeries Object of type *FILE Types:
Physical
Source Data
Logical Display
Screen Menu
Printer
3
Members
Contains the same format Contains sets of data of a file Can be a source or a data Maximum number of members 32767 Members in one LF member - 32
Logical Files
Contains no Data Used to arrange the data in a PF in different sequences Can change the length and the data type Can join more than one PF Join Logical Files
5
File Description
Described at Record Level and/or Field level Field-Level Description Name, length, data type, Validity Checks, etc. Called Externally-Described Files Record-Level Description Describes only the record length of the file. Called Program Described files File object must exist before using it in a program
8
File Description
Two major parts of the description
Record Format Description
Includes Field-Level description Describes the order of the fields in a record PF can have only one record format
Arrival Sequence
9
Others:
SQL (Structured Query Language)
10
11
Example of DDS
13
14
16
17
18
20
21
23
26
27
28
Steps for 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 using DFU or SQL
30
31
32
Viewing records
RUNQRY QRYFILE(filename)
or
33
DFU
Data File Utility Part of ADT Used to manipulate (Add, Change and Delete) a database file Used to load the test data for the application Used to quickly load data for prototyping the application Can be invoked through STRDFU It creates a temporary program to enter data into the file
36
DFU
37
DFU
38