OPTIONS
This option is valid only when DIRECT YES is in effect.
Options specified within the SELECT OPTIONS statement override their global command option equivalents.
PART or LOGICAL PART
Specify PART followed by integer values from 1 through 4096, or a range of values. The values identify the partitions of the partitioned table space that UNLOAD PLUS will unload for the corresponding SELECT statement.
Optionally, you can specify the LOGICAL keyword with PART to indicate that you are specifying the logical partitions to unload rather than the physical partitions.
Specifying PART within a SELECT OPTIONS statement overrides the PART and FILTERPART command options for the corresponding SELECT statement.
Specifying partition numbers
Note the following information about how to specify partition numbers with the PART option:
- Individual partitions in a list can be in any order (but partitions within a range must be in ascending order).
- You can specify a mixture of individual partitions and ranges of partitions.
- If you specify a partition number more than once, UNLOAD PLUS ignores any occurrence after the first.
In the following example, specifying PART 1, 3, 4, and 5 within the SELECT OPTIONS statement overrides the PART 2 global command option. Only partitions 1, 3, 4, and 5 will be unloaded.
SELECT * FROM MY.TABLE
OPTIONS (PART 1, 3, 4, 5)
;
You can also specify a range of values as shown in the following example. Specifying PART 1:5 (as shown in the following example) within the SELECT OPTIONS statement overrides the PART 2 global command option and unloads partitions 1, 2, 3, 4, and 5.
SELECT * FROM MY.TABLE
OPTIONS (PART 1:5)
;
Dynamic allocation
Specifying PART also determines which data sets UNLOAD PLUS dynamically allocates for the corresponding SELECT statement. In the following example, one data set will be generated for the SELECT statement (USER.P001) and only the first partition in the partitioned table space will be unloaded.
UNLOADDN(SYSREC) ACTIVE (YES)
OUTPUT SYSREC DSNAME 'USER.P&PART'
SELECT * FROM MY.PART3TB
OPTIONS (PART 1)
;
Restrictions
The following restrictions apply to the PART option:
- UNLOAD PLUS terminates if you specify both logical and physical partitions in the same job.
- If you specify INFILE ddname and supply DDL (using a DDLIN data set), UNLOAD PLUS ignores the LOGICAL keyword and considers the specified partitions to be physical partitions.