IBM SC41-5210-04 Server User Manual


 
v CL and DDS use the same terms and descriptions as IDDU, but they provide additional support for files.
Using DDS and CL commands, you can define and create physical files and logical files to indicate how
fields are to be organized in files.
A physical file contains the fields of data, as records, but logical files do not. A physical file contains at
least one record format. The field order in a physical file determines the format of the records.
A logical file gives a different view of the data stored in one physical file or in several physical files. A
logical file does not contain data. That is, a logical file lets you see information in records that are stored
in physical files as though the records actually existed that way. This is accomplished without having to
duplicate and store that data on the system in that logical view (thus, the name logical file). A logical file
can use a subset of the fields in one physical file, a composite of all or some of the fields in several
physical files, or even a mixture of fields from physical and other logical files. Join logical files can have
only one record format, but nonjoin logical files can have more than one record format.
For more information about physical files, logical files, CL, and DDS, refer to the CL Programming
book.,
v The DB2 UDB for iSeries program uses a relational model of data; that is, all data is perceived as
existing in tables. On the iSeries system, DB2 UDB for iSeries objects are created and maintained as
OS/400 objects. The following table shows the relationship between OS/400 terms and DB2 UDB for
iSeries relational database terms:
OS/400 Term DB2 UDB for iSeries Term
Library Collection. Consists of a library, journal, journal receiver, data dictionary, and DB2 UDB for
iSeries catalog. A collection groups related objects and allows the user to find the objects by
name.
Physical file Table. A set of columns and rows.
Record Row. The horizontal part of a table containing a serial collection of columns.
Field Column. The vertical part of a table of one data type.
Logical file View. A subset of columns and rows of one or more tables.
Query for iSeries definitions
You use a query to get information from database files to produce a report. The file or files that a query
uses to get the information and what is to be done with that information are defined and stored in a query
definition. A query definition is an object (with type *QRYDFN) and it contains all the details that Query
needs to find and use the files in the way you specify, and to produce the results that you expect.
To create a query definition, you follow a sequence of displays that guide you through the process of
defining and saving a query definition. Once you have defined your query (and even while you are defining
your query), you can run it (as a query) to produce the reports that you need.
Libraries in Query for iSeries
A library is a place on the system to store objects, including the query definitions and files that you use in
Query for iSeries. Therefore, when you are working with queries and files, you may need to specify the
library where a query or file is stored.
Major functions of Query for iSeries
Two primary Query displays, the Query menu and the Work with Queries display, are the starting point for
the major tasks that you can do using Query. (See Figure 3 on page 6.) Another important display is the
Define the Query display, which starts all the tasks in a query definition.
v The Query menu allows you to start working with queries, run a query, or delete a query. It also allows
you to start working with files.
v The Work with Queries display allows you to do specific tasks with one or more queries. You can
create, change, display, copy, delete, or run a query, or print a query definition.
Chapter 1. What is Query for iSeries? 5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
||
|
|
||
||
||
||
|
|
|
|
|
|