Switching data set backup tapes
When you specify a value other than zero for SETSYS DSBACKUP(TAPE(DEMOUNTDELAY(MAXIDLETASKS(n)))), the data set backup function may allow output tapes to be continuously mounted for an indefinite amount of time. There may be times when you want or need to demount the tapes. You can use the SWITCHTAPES keyword and parameters to demount a continuously mounted tape. You may want to do so, for example, so that it or an alternate can be taken to another site for disaster backup, or so that you can install new tape devices. The SWITCHTAPES keyword is available on both the DEFINE and HOLD commands.
DEFINE SWITCHTAPES tells DFSMShsm that, at specific times or events, you want the data set backup function to automatically demount and deallocate all currently mounted tapes and allocated drives. HOLD(BACKUP(DSCOMMAND)) tells DFSMShsm that you want to immediately quiesce data set backup activity to tape, demount all mounted tapes, and deallocate all tape devices. Therefore, if you plan ahead, you can use the DEFINE command to switch tapes. For unplanned activity, use the HOLD command to switch tapes.
- TIME
- Indicates that you want to define a time when DFSMShsm initiates the demount and deallocation of all mounted tapes, performed at a certain time of day.
- AUTOBACKUPEND
- Indicates that you want DFSMShsm to initiate the demount and deallocation of all mounted tapes at the end of the autobackup cycle.
- PARTIALTAPE
- Indicates the method that DFSMShsm uses to mark an output tape as full. This is an optional keyword. MARKFULL, REUSE, and SETSYS are all valid options. SETSYS indicates that you want DFSMShsm to use the SETSYS PARTIALTAPE value.
The HOLD BACKUP(DSCOMMAND(SWITCHTAPES)) command tells DFSMShsm to perform SWITCHTAPES processing now; that is, to demount and to deallocate drives. DFSMShsm demounts active tapes at the end of the current data set, but immediately demounts idle tapes. The demounted tapes are marked full or not, according to the existing PARTIALTAPE parameter of the DEFINE SWITCHTAPES command. No subsequent RELEASE command is necessary. After these tapes are demounted and the drives are deallocated, data set backup continues with newly selected tapes, if requests are present.
Related reading
For more information about the exact syntax of the DEFINE and HOLD commands, see DEFINE command: Defining control structures for use by DFSMShsm and the HOLD command: Preventing DFSMShsm functions from running.