/SWITCH command
Use the /SWITCH command to switch active data sets or to change between the active and alternate systems. Certain combinations of keywords are valid only in the active or alternate systems, as shown in the format in the syntax diagram.
This command can be issued to an IMSplex using the Batch SPOC utility.
Subsections:
Environment
The following table lists the environments (DB/DC, DBCTL, and DCCTL) in which you can use the commands and keywords.
Command / Keywords | DB/DC | DBCTL | DCCTL |
---|---|---|---|
/SWITCH | X | X | X |
ABDUMP | X | X | |
ACTIVE | X | X | |
BACKUP | X | X | |
CHECKPOINT | X | X | X |
FORCE | X | X | |
OLDS | X | X | X |
SYSTEM | X | X | |
WADS | X | X | X |
Syntax
Keywords
The following keywords are valid for the /SWITCH command:
- SYSTEM
- Requests a takeover by the alternate system
from the current active system in an XRF environment.
/SWITCH SYSTEM without the FORCE keyword causes the active system to attempt to gracefully quiesce before the alternate system becomes active. System activity currently in progress is allowed to complete. New activity is queued. This disables surveillance on the active system, but not the alternate. Therefore, surveillance (if enabled) will eventually trigger a takeover if it does not eventually quiesce.
Unless the optional FORCE keyword is specified, the command is only operable when entered on the active system.- FORCE
- Causes an immediate termination of the active system, forcing the alternate system to become the active.
- ABDUMP
- Results in a diagnostic dump of the active system when entered from either the active system or the alternate system (if it is on the same processor as the active system).
- ACTIVE, BACKUP
- Indicates the system on which the command is being entered. The keyword ACTIVE is required when the command is entered on an active system. The keyword BACKUP is optional when the command is entered on an alternate system. /SWITCH SYSTEM FORCE, without the ACTIVE keyword, can only be entered on an alternate system. This prevents the inadvertent abend of a newly created active system that is mistakenly assumed to still be the alternate system.
- OLDS, CHECKPOINT
- Causes switching of the active log data set. This log switch capability is identical to that provided with /DBDUMP and /DBRECOVERY commands. You can specify the CHECKPOINT keyword to take a simple checkpoint after the active log data set has been switched to the next OLDS. The /SWITCH OLDS CHECKPOINT command operates in all IMS environments.
- WADS
- Causes switching of the active write-ahead
log data set. If you are using dual logging for the WADS, this command causes IMS to use the next available WADS pair.
This command is rejected if no unused WADS is available, or for dual logging, if no unused pair of WADS is available.
Examples
Example 1 for /SWITCH command
/SWITCH OLDS
DFS3257I ONLINE LOG NOW SWITCHED
DFS058I 17:10:51 SWITCH COMMAND COMPLETED
/SWITCH OLDS CHECKPOINT
DFS3257I ONLINE LOG NOW SWITCHED - FROM DFSOLP01 TO DFSOLP02
DFS058I 17:12:53 SWITCH COMMAND COMPLETED
DFS2719I MSDB CHECKPOINT WRITTEN TO MSDBCP2
DFS994I *CHKPT 91057/171254**SIMPLE*
DFS3499I ACTIVE DDNAMES: MODBLKSA IMSACBA FORMATA MODSTAT ID: 1
DFS3804I LATEST RESTART CHKPT: 91057/132000, LATEST BUILDQ CHKPT:
91057/132414
Example 2 for /SWITCH command
/SWITCH SYSTEM FORCE
Response ET:
A response message is not returned for the /SWITCH SYSTEM FORCE command. Any further input to the master terminal of the active system is inhibited.
Response RT (z/OS® console for active system IMSA):
The z/OS console for the active system will show a user 0604 abend in progress for IMSA. If the ABDUMP keyword had been included on the /SWITCH command, the 0604 abend would be accompanied by a diagnostic dump of the active system.
Response RT (master terminal for alternate system IMSB):
The following figure is a screen that shows some of the messages associated with the beginning of takeover on the alternate system.
- Enabling of dependent region processing
- IRLM takeover
- Backout processing
- Draining of suspend queue
- Session switching
Takeover is complete and the alternate system is now an active system. The XRF environment status line indicates that the newly created active system is running in I/O toleration mode (awaiting I/O prevention).