Table reorganization involves saving the table data into a file and then storing the data from the file back into the table. This process for saving table data in a file is called unloading a table.
You can unload a table in units of tables or RDAREAs (applicable to row-partitioned tables).
The figure below provides an overview of unloading a table.
Figure 8-6 Overview of unloading a table
To migrate data into another table, first save the table data to an unload data file and then reload the data from the unload data file into the other table. Note that the target table must have the same attribute (FIX or non-FIX) and column definitions (such as number of columns and their data types) as the source table. However, data migration may still be possible even when their definitions are different if you use pdload's input data file (-W option specified) as the unload data. When you reload compressed tables to separate tables, do not use the unload data files that are output during table reorganization because their data is compressed. Instead, use the files that are output during table unload processing.
The figure below provides an overview of migrating data to another table.
Figure 8-7 Overview of migrating data into another table
To modify table partitioning conditions, first save the table data to an unload data file, then modify the table partitioning conditions, and reload the data from the unload data file back into the table.
The figure below provides an overview of modifying table partitioning conditions.
Figure 8-8 Overview of modifying table partitioning conditions
To use an unload data file as pdload's input data file or with a UAP, specify the -W option during unload operation.
Unload a LOB column structure base table and the LOB columns at the same time. You cannot unload only the LOB columns.
When a table for which a character set has been defined is unloaded, pdrorg performs character code conversion regardless of whether a UOC is used. In this case, pdrorg converts the data in a character set-defined column to the default character set (character codes specified in the pdsetup command) and then outputs the data to the unload data file.
To unload compressed tables, pdrorg expands data in the compressed columns and then outputs the data to unload files.
You can also unload tables with the FIX attribute for which reserved columns are defined. Note that reserved columns are not output to the pdload unload file that is created during execution of pdrorg with the -w option specified.
For details about unloading tables using a UOC, see 8.1.2 (8) Reorganization using a UOC.
For details about how to use a utility special unit, see 8.1.2 Reorganizing a table.