PRELOAD phase
The PRELOAD phase of LOADPLUS prepares the input for loading into the specified tables by the LOAD phase.
Depending on the data that you are loading, the characteristics of the table, and the options that you specify, the PRELOAD phase performs the following tasks:
- Reads the input data from the SYSREC data set
- Generates identity column or row change timestamp column values if needed
- Converts data if needed
- Verifies that the data is correct
- Sorts the data if needed
- Sets up data to allow concurrent processing for loading table spaces and building indexes, and for concurrent loading of partitions
- Optionally sorts input data (when you specify ORDER YES)
Unloads existing indexes and merges them with the new index keys from the input data (when you specify RESUME YES and INDEX BUILD)
LOADPLUS sorts merged index data to build organized indexes during the LOAD phase.
- Produces a comprehensive discard report
- If you specify UNIQUECHECK YES or UNIQUECHECK CLUSTER, checks unique data-sorting keys for duplicates and discards them
- If you specify UNIQUECHECK YES, checks unique non-data-sorting indexes for duplicates and discards them
- Builds or keeps the compression dictionary and compresses the data rows
- Builds the Db2 data rows and writes them to the SORTOUT data set
- Writes the index work records to the SYSUT1 data set
- At the end of the phase, frees the allocation for the SYSREC and SYSDISC data sets
Resource allocation
The following figure shows resources that are allocated during the PRELOAD phase of a two-phase load:
Read, sort/data, and index tasks
During the PRELOAD phase, LOADPLUS performs the main tasks that the following table describes:
Task | Description |
---|---|
Read |
|
Sort/data |
|
Index |
|
LOADPLUS does not perform the index task in the following cases:
- No unique indexes are participating in the load.
- You specify UNIQUECHECK NO.
- You specify UNIQUECHECK CLUSTER with ORDER YES.
- You specify INDEX UPDATE.
- Only the data-sorting index is unique and you specify ORDER YES or ORDER PRESORTED.
Invoking BMCSORT
LOADPLUS invokes BMCSORT during the PRELOAD phase under any of the following conditions:
- You specify the ORDER YES option on the LOAD command.
- You specify UNIQUECHECK CLUSTER and unique data-sorting indexes exist.
- You specify UNIQUECHECK YES and unique indexes are participating in the load.
- The table space is segmented and contains multiple tables.
- LOADPLUS discards any records for duplicate key violations.
Related topic