Using multitasking with GROUP YES
Specifying grouping
You can specify the option GROUP YES with any SHRLEVEL to specify that initialization logic is to be performed for all spaces in the group, at one time in the beginning.
All termination logic is also performed for all spaces in the group, at one time at the end. Initialization logic includes parsing, authorization checking, status checking, concurrency checking, status changes, and synchronization (START/STOP/QUIESCE). Termination logic includes status changes and synchronization (START/STOP/QUIESCE). GROUP YES is implied by repeating TABLESPACE or INDEXSPACE under the same COPY statement or by using INDEXES YES.
Grouping is useful for all types of copies because it provides the ability to guarantee a set of consistent SHRLEVEL REFERENCE or SHRLEVEL CONCURRENT copies, or a common quiesce point for SHRLEVEL CHANGE copies. Some of the scenarios allowed or required by grouping are:
- You can specify different values for object options, such as COPYDSN, RECOVERYDSN, and COPYDDN by using multiple TABLESPACE keywords, multiple INDEXSPACE keywords, or both for the COPY command, while still using global options for all of the copies.
- You can group certain partition numbers using multiple DSNUM values.
- You can use multiple TABLESPACE keywords to give each space its own COPYDSN value if you use special naming conventions that cannot be handled by a single COPYDSN.
- You can use the grouping capabilities without dynamic allocation by specifying different values for COPYDDN, DSNUM ALL or DSNUM integer, RECOVERYDDN, or TASK.
Numerous variations are possible by allowing multiple sub-options within a single grouped COPY command.
Examples that use grouping and multitasking
The following syntax makes a Snapshot Copy of a group of table spaces using ten different subtasks:
OUTPUT OUT1 UNIT SYSDA
COPY TABLESPACE ACPDB*.* COPYDDN( OUT1 )
SHRLEVEL CONCURRENT
GROUP YES
The following syntax copies a group of table spaces with ten different subtasks and stacks on ten different tapes:
OUTPUT OUT1 UNIT CART STACK YES
COPY TABLESPACE ACPDB*.* COPYDDN( OUT1 )
GROUP YES
The following syntax copies a group of table spaces as a group and stacks them on 3 sets of tapes, using TASK to control which spaces are stacked on which tape and limiting the copy to three subtasks. The grouping is implied because multiple TABLESPACE specifications are used.
OUTPUT OUT1 UNIT CART STACK YES
COPY TABLESPACE ACPDB1.* COPYDDN( OUT1 ) TASK 1
TABLESPACE ACPDB2.* COPYDDN( OUT1 ) TASK 2
TABLESPACE ACPDB3.* COPYDDN( OUT1 ) TASK 3
RESETMOD NO FULL NO READTYPE AUTO