DFHCRNP (connection manager—CSNC transaction)
Interregion communication is controlled by the interregion control program, DFHCRNP, which runs as transaction CSNC. This is attached when CICS first logs on to the interregion program, and it remains attached until interregion communication is closed.
The main purpose of CSNC is to perform housekeeping and control on IRC
sessions, and to simulate the access method. Its functions include the following:
- Establish connections to other address spaces (by issuing CONNECT requests)
- Detect unsolicited input data on connections and attach requested tasks to process such data
- Disconnect unallocated (between-bracket) sessions during QUIESCE
- Issue DFHKC AVAIL for any secondary sessions which have become available for reallocation, and are in demand
- Issue PC RETURN when QUIESCE is complete.
CSNC is attached by DFHCRSP (IRC startup), and waits when it is not processing work. It is resumed by the dispatcher when the MRO work queue ECB has been posted, or the delay interval (if set) has expired and there is delayed work to be retried.
Whenever CSNC is posted, it
checks first whether it has been invoked because quiescing of the interregion
facility is complete.
- If CSNC has no been resumed to complete interregion quiesce processing,
it checks each of the following:
- If the “delay-queue” is not empty, CSNC attempts to process any work it finds there. (An element is added to the queue whenever a transaction cannot be attached by CSNC. The system could, for example, have been at maximum tasks or short on storage when the previous attempt was made. It is also possible that a remote system tried to start a new conversation before the local system had freed the required session from an earlier conversation.)
- If a new conversation has been received:
- If this is the first conversation on a new connection, and the connecting region is not a batch region, session recovery is performed. This means that if the name of the secondary connecting matches the name of the secondary connected in the previous session, the old session is bound once again.
- If there is no match, or if a batch region is connecting, the first available session is allocated.
- CSNC attempts to attach the required transaction, identified in the attach header included in the data stream. It is possible for a request to arrive for this session before the session has been freed from the transaction that last used it. In such a case, the transaction to be attached is added to the delay-queue.
- The input data stream is built into a TIOA for the session.
- If this region is a secondary, and there is no task associated with the connection, and the connection is in quiesce, CSNC disconnects the session.
- If this region is a primary, and it has received a “disconnect” request
from the connected secondary, CSNC disconnects the session if:
- There is no associated TCTTE
- There is no task associated with the link.
- If CSNC has been resumed to complete interregion quiesce processing, it:
- Sends message DFHIR3762 to the CSMT log.
- Resumes any suspended mirror tasks with a facility address of zero, so they can detach themselves.
- Disable immediate and delay queues. Any remaining work on those queues (for example, old retry work which has not been serviced yet) is automatically discarded.
- Logs off from the interregion SVC.
- Detaches, using a DFHLFM TYPE=RETURN request.