ORDER
Specify the ORDER option to tell UNLOAD PLUS whether to sort the output records.
The encoding scheme of the table determines the collating sequence for character data. For example, if the encoding scheme of the table is EBCDIC, the collating sequence is EBCDIC.
The ORDER BY option overrides the ORDER option. Use the ORDER BY option to order by anything other than the data-sorting key.
NO
ORDER NO is the default. ORDER NO unloads the output records in the same order in which UNLOAD PLUS found the data rows in the table space.
YES
This option is meaningful only when DIRECT YES is in effect.
ORDER YES sorts the selected rows in clustering key order or, if there is no clustering key, in partitioning key order. If a selected table does not have a clustering or partitioning key, UNLOAD PLUS changes this option to ORDER NO. If you are unloading a multi-table table space, UNLOAD PLUS sorts first by table, then by data-sorting key.
When multiple tasks unload rows to a single output data set, all tasks execute concurrently to perform the sorting. However, UNLOAD PLUS writes the selected rows in task sequence so that each output process completes before the next starts, unless you specify BYTASK.
Restrictions
Note the following restrictions when you specify ORDER YES:
- If you also specify SPANNED YES, UNLOAD PLUS terminates.
When you are unloading a table-controlled partitioned table space with a clustering index, UNLOAD PLUS uses a single task when either of the following conditions exists:
- The clustering key does not match, or is not a subset of, the partitioning key.
- The clustering index is not partitioned and the clustering key is a subset of the partitioning key.
This restriction does not apply when you specify ORDER YES BYTASK.
- When you are unloading a partition-by-growth table space, UNLOAD PLUS uses a single task.
- When DIRECT NO is in effect, UNLOAD PLUS ignores ORDER YES and does not sort on the data-sorting key.
BYTASK | ORDER YES BYTASK orders the selected rows of a table by its data-sorting key within each task. This option is significant only when multiple tasks, executing concurrently, unload rows to a single unload data set. In that case, BYTASK removes serialization from the output process, which enhances performance. All rows that UNLOAD PLUS unloads from a single task are in order, but might be intermixed with other tasks’ unloaded rows. |
---|
Related topic