5.2.1 Loading data to a table with indexes defined

Figure 5-5 shows data loading into a table for which indexes are defined.

Figure 5-5 Loading data to a table with indexes defined

[Figure]

Organization of this subsection
(1) Command to be executed
(2) Control information file
(3) Input data file
(4) Inconsistent order of columns between input data and table

(1) Command to be executed

The following explains the options specified with pdload:

PRODUCT
This is the identifier of the table subject to data loading.
control_file:
This is the name of the control information file.

For the omitted options, the system assumes the following values:

-d omitted: Addition mode
{-a|-b} omitted: Input data file in the DAT format
-i omitted: Batch index creation mode
-l omitted: Pre-update log acquisition mode

(2) Control information file

(a) source statement

The source statement specifies the input data file named /usr/inputfile.

(b) index statement

The index statement specifies the index information file named /usr/idxfile.

(3) Input data file

This example specifies the input data file in the DAT format.

(4) Inconsistent order of columns between input data and table

If the order of columns does not match between the input data file and the table, you can specify a column structure information file to define the correspondence of columns between input data and table.

You can use the column structure information files only when the input data file is in DAT, fixed-size data, or pdrorg-generated binary format (non-FIX).

The following shows an example:

[Figure]

Explanation
The order of input data items does not match the order of table columns.
In this case, use a column structure information file to specify column names in the order of input data items.