To dynamically change the default application server, enter the CICS CIRC transaction. The CIRC transaction has one parameter:
>>-CIRC--server_name------------------------------------------->< |
The parameters are described below. For the syntax rules of the transactions, see Using Syntax Rules for DB2 Server for VSE CICS Transactions.
The parameter has the following meaning:
The server_name specified must already have connections established to it, either from the CIRB or CIRA transactions. If connections to the specified server do not exist, message ARI0456I Connections to <server_name> do not exist. is displayed. In this case the CIRA transaction must first be run to establish the connections, then the CIRC transaction is run to make it the default server.
For the following example assume that connections exist to SQLMACH1 and SQLMACH2 and that SQLMACH2 is the current default server.
Figure 20. Example of CIRC
msg f2
AR 015 1I40I READY
2 circ sqlmach1
F2-002 ARI0459I The new default server is SQLMACH1.
The previous default server was SQLMACH2.
For this next example assume that connections exist to SQLMACH1 but not to SQLMACH2.
Figure 21. Example of CIRC
msg f2
AR 015 1I40I READY
2 circ sqlmach2
F2-002 ARI0456I Connections to SQLMACH2 do not exist.
2 cira ,,,sqlmach2
F2-002 ARI0454I Connections to SQLMACH2 established.
RMCV at 0055D2E0.
2 circ sqlmach2
F2-002 ARI0459I The new default server is SQLMACH2. The previous
default server was SQLMACH1.
It is important to note that if the connections to the default server are lost, that server is still identified as the default server. The connections can be lost because the server went down or because the CIRR transaction was used to end the connection. Users that are trying to connect to the default server in these cases will receive SQLCODE = -940. If the CIRB or CIRA transaction establishes connections to a server that is not ready, the message "ARI0418A DB2 Server for VSE server <server-name> is not ready. Retry the enable transaction <tran> after DB2 Server for VSE starts." is displayed. If there is no active online resource adapter the CIRB transaction must be used. If there is an active online resource adapter the CIRA transaction must be used.