5.7.3 Add data statement

Organization of this subsection
(1) Format
(2) Operands
(3) Notes

(1) Format

 *adddata*
 column-name,sequence=([authorization-identifier.]sequence-generator-identifier)

(2) Operands

(a) column-name

Specifies a name for the column that is to store the sequence numbers generated by the sequence generator.

(b) sequence=([authorization-identifier.]sequence-generator-identifier)

Specifies the identifier of the sequence generator from which sequence numbers are to be acquired.

If the authorization identifier is omitted, the user executing pdload (authorization identifier specified in the -u option or the PDUSER environment variable) is assumed.

(3) Notes

The add data statement cannot be specified on the first line of the column structure information file to load only the sequence numbers generated by the sequence generator. To store only the sequence numbers in the table, you must prepare the required rows of data and then perform data loading with replace specified in the sequence operand. The example below stores only the sequence numbers in the table.

Example:
Specify the table definition as follows:

   create table TABLE_C (
     col01 integer
  );

For the input data file, prepare in DAT format as many linefeed data items as there are rows. To store the sequence numbers generated by sequence generator USER01.SEQ_C01 in column col01, you must specify the column structure information file as follows:

  col01,sequence=(USER01.SEQ_C01),replace=force

If you use pdparaload or if you load data in units of RDAREAs, do not specify this operand for partitioning key columns. If you do specify this operand in such a case, a sequence number obtained from the sequence generator will be used as the partitioning key value. As a result, data might not be stored because the corresponding partitioning key value will no longer be subject to storage in the specified RDAREA.