/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.

Table 1. Valid environments for the /SWITCH command 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

Figure 0. /SWITCH for an active XRF subsystem
Read syntax diagramSkip visual syntax diagram/SWITCH/SWISYSTEMFORCEABDUMPACTIVEOLDSCHECKPOINTWADS
Figure 0. /SWITCH for an alternate XRF subsystem
Read syntax diagramSkip visual syntax diagram/SWITCH/SWISYSTEMFORCEABDUMPBACKUPOLDSCHECKPOINTWADS

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

Entry ET:
  /SWITCH OLDS
Response ET:
  DFS3257I ONLINE LOG NOW SWITCHED
  DFS058I 17:10:51 SWITCH COMMAND COMPLETED
Entry ET:
  /SWITCH OLDS CHECKPOINT
Response ET:
  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

Entry ET (Master Terminal for active system IMSA):
  /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.

Figure 1. Alternate system at start of takeover
02/05/15 15:28:27  RSENAME: DFSRSENM  BACKUP   TAKEOVER IN PROGRESS  IMSB
DFS3890I 15:27:18 TAKEOVER REQUESTED
DFS970I 15:28:05 UNEXPECTED  STATUS   ,NODE APPLA  ,USER  N/A  ,SEND  ,RC
=14,FDB2=13,NSECIT =29,SENSE=00000000,REASON=00
DFS3257I ONLINE LOG CLOSED ON DFSOLP00
DFS3891I 15:28:18 TAKEOVER IN PROGRESS
 
 DFS2591I NO MSDB HEADERS FOUND, IMAGE COPY LOAD IGNORED
DFS3839I 14:26:46 XRF INITIAL DB PRE-OPEN COMPLETE.
DFS3838I 14:28:41 XRF INITIAL DC PRE-OPEN COMPLETE.
-------------------------------------------------------------------------
 
 
 
 
 
 
 
 
 
 
                                                      PASSWORD:
 
 
Intermediate screens are not shown. They would indicate such takeover functions as:
  • Enabling of dependent region processing
  • IRLM takeover
  • Backout processing
  • Draining of suspend queue
  • Session switching
The following figure is a screen that show takeover is complete.
Figure 2. Newly created active system after takeover
02/05/15 15:30:59  RSENAME: DFSRSENM  ACTIVE  AWAITING I/O PREVENTION  IMSB
 DFS994I *CHKPT 85135/152931**SIMPLE**
DFS3499I ACTIVE DDNAMES: MODBLKSA IMSACBA  FORMATA  MODSTAT ID:   11
DFS3804I LAST CHKPT ID VALID FOR RESTART: 85135/152931-BUILDQ: 85135/142629
 
 
DFS994I TAKEOVER COMPLETED.
DFS3859I 15:29:19 PRIORITY 4 SESSIONS SWITCHED.
DFS3860I 15:29:19 ALL TERMINAL SESSIONS SWITCHED.
---------------------------------------------------------------------------
 
 
 
 
 
 
 
 
 
 
                                                      PASSWORD:
 
 

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).