Methods of describing data to the system

If you want to describe a file just to the record level, you can use the record length (RCDLEN) parameter on the Create Physical File (CRTPF) and Create Source Physical File (CRTSRCPF) commands.

If you want to describe your file to the field level, several methods can be used to describe data to the database system: IDDU, SQL* commands, or data description specifications (DDS).
Note:Because DDS has the most options for defining data for the programmer, this guide will focus on describing database files using DDS.

Describing data to the system: OS/400 Interactive Data Definition Utility (IDDU)

Physical files can be described using IDDU. You might use IDDU because it is a menu-driven, interactive method of describing data. You also might be familiar with describing data using IDDU on a System/36. In addition, IDDU allows you to describe multiple-format physical files for use with Query, Client Access, and DFU.

When you use IDDU to describe your files, the file definition becomes part of the OS/400 data dictionary.

For more information about IDDU, see the IDDU Use book.

Describing data to the system: DB2 UDB for AS/400 Structured Query Language (SQL)

The Structured Query Language can be used to describe an AS/400 database file. The SQL language supports statements to describe the fields in the database file, and to create the file.

SQL was created by IBM to meet the need for a standard and common database language. It is currently used on all IBM DB2 platforms and on many other database implementations from many different manufacturers.

When database files are created using the DB2 UDB for AS/400 SQL language, the description of the file is automatically added to a data dictionary in the SQL collection. The data dictionary (or catalog) is then automatically maintained by the system.

The SQL language is the language of choice for accessing databases on many other platforms. It is the only language for distributed database and heterogeneous systems.

For more information about SQL, see DB2 UDB for AS/400 SQL Programming Concepts and DB2 UDB for AS/400 SQL Reference .

Describing data to the system: OS/400 Data Description Specifications (DDS)

Externally described data files can be described using DDS. Using DDS, you provide descriptions of the field, record, and file level information.

You might use DDS because it provides the most options for the programmer to describe data in the database. For example, only with DDS can you describe key fields in logical files.

The DDS Form provides a common format for describing data externally. DDS data is column sensitive. The examples in this manual have numbered columns and show the data in the correct columns.

DB2 UDB for AS/400 SQL Reference contains a detailed description of DDS functions to describe physical and logical files.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]