RETAIN—Keep Tape Volumes Mounted

The RETAIN keyword keeps all dynamically allocated image copy tape volumes mounted for a recovery statement.
cafrdb2
The RETAIN keyword keeps all dynamically allocated image copy tape volumes mounted for a RECOVER statement. This processing is similar to using VOL=(,RETAIN) in JCL. However, this keyword applies to
all
dynamically allocated tape volumes containing multiple image copies that are needed for the RECOVER statement. If a tape contains only one image copy that is needed, it is not retained. The RETAIN keyword helps prevent repeated dismounting of the tape when you are recovering a tablespace or tablespaces that have their image copies on the same tape.
Because each volume remains mounted during the RECOVER statement, verify that enough devices are available. The number of available devices should meet or exceed the number of volumes that must be mounted for the recovery. These devices are unavailable to other jobs until the end of the current RECOVER statement.
Review the following considerations:
  • Remounts can be mandatory when image copies span two or more tapes.
  • RETAIN is not valid with REBUILD INDEX.
Consider the following recovery scenario:
  • You are recovering three tablespaces from image copies that are on two tapes. Tablespace A is on TAPE1, tablespace B spans TAPE1 and TAPE2, and tablespace C is on TAPE2.
  • If you recover these tablespaces with MAXTASKS 2, the recovery of tablespace B cannot begin until the recovery of the tablespace A is complete. You cannot multitask from the same tape. When the recovery of tablespace B does begin, TAPE2 might already be in use by tablespace C. A remount of TAPE1 is then unavoidable when the recovery of tablespace B begins.
This keyword has the following format:
RETAIN [
NO
|YES]
  • NO
    Does not keep tape volumes mounted. This value is the default.
  • YES
    Keeps all tape volumes mounted.
If you omit the RETAIN keyword, the mountable volumes dismount when the merge process completes.