Switch the transmission queue associated with cluster-sender channels (SWITCH)

You can use the SWITCH function of CSQUTIL to switch or query the transmission queue associated with cluster-sender channels.

To use the SWITCH function the queue manager must be running.

Switch transmission queue (SWITCH)

Read syntax diagramSkip visual syntax diagram SWITCH CHANNEL ( <channel-name><generic-channel-name> ) MOVEMSGS(YES)MOVEMSGS(NO)STATUS

Keywords and parameters

CHANNEL (channel name)
Specifies the name of a cluster-sender channel, or a generic channel name.

If a generic channel name is specified each cluster-sender channel that matches the generic name is processed.

If a single asterisk is specified all cluster-sender channels are processed.

MOVEMSGS
Specifies whether messages queued for the channel should be moved from the old transmission queue to the new transmission queue during the switching process. Values are:
YES

Messages are moved from the old transmission queue to the new transmission queue. This is the default.

NO

Messages are not moved from the old transmission queue to the new transmission queue. If this option is selected it is the responsibility of the system programmer to resolve any messages for the channel on the old transmission queue after the switch has completed.

STATUS
Display the switching status for matching cluster-sender channels. If this keyword is not specified the command switches the transmission queue for stopped or inactive cluster-sender channels that require switching.

Examples

Figure 1 illustrates how the SWITCH function can be used to query the switching status of all cluster-sender channels whose names match the generic name CLUSTER.*.
Figure 1. Sample JCL for querying the switching status of cluster-sender channels using the CSQUTIL SWITCH function


//SWITCH  EXEC PGM=CSQUTIL,PARM=('CSQ1')
//STEPLIB  DD DISP=SHR,DSN=thlqual.SCSQANLE
//         DD DISP=SHR,DSN=thlqual.SCSQAUTH
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
SWITCH CHANNEL(CLUSTER.*) STATUS
/*
Figure 2 illustrates how the SWITCH function can be used to switch the transmission queue for the cluster-sender channel CLUSTER.TO.QM1.
Figure 2. Sample JCL for switching the transmission queue associated with a cluster-sender channel using the CSQUTIL SWITCH function


//SWITCH  EXEC PGM=CSQUTIL,PARM=('CSQ1')
//STEPLIB  DD DISP=SHR,DSN=thlqual.SCSQANLE
//         DD DISP=SHR,DSN=thlqual.SCSQAUTH
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
SWITCH CHANNEL(CLUSTER.TO.QM1)
/*

Usage notes

  1. The channel initiator must be running to initiate a switch of transmission queue for cluster-sender channels.
  2. The transmission queue associated with a cluster-sender channel can only be switched if the channel is STOPPED or INACTIVE.
  3. You need the necessary authority to use the command server queues (SYSTEM.COMMAND.INPUT, SYSTEM.COMMAND.REPLY.MODEL, and SYSTEM.CSQUTIL.*)
  4. You need the necessary authority to issue the START CHANNEL command.
  5. To initiate a switch of transmission queue for a cluster-sender channel, you also need command resource authority for the channel.
  6. You cannot use the SWITCH function to query the status of, or switch the transmission queue for, a cluster-sender channel that has not been started since version 8 new function has been enabled using the OPMODE parameter in the CSQ6SYSP macro.