Termination

The REX task posts the SCT task’s terminate ECB when a SHUTDOWN or NETWORK HALT command is issued, or from the TPEND exit (DMTVXTTP).

When the ECB is posted, the SCT task starts to close the RSCS/VTAM interface to prevent VTAM from driving additional LOGON or SCIP exit routines. When ending as usual, the SCT task issues a SETLOGON request with the QUIESCE option. When an abend occurs (for example, the terminate ECB is posted from the TPEND exit), the SCT task issues a CLOSE ACB request. The CLOSE macro tells VTAM that RSCS is ending its association with VTAM.

The SCT task then sets the VTAM interface shutdown in progress flag (TGSVSIP) in the CVT to prevent RSCS from starting more session drivers. Each session driver’s terminate ECB is posted and the SCT task waits on its terminate ECB until all session drivers terminate. Depending on the severity of the termination, TPEND or normal, the links may quiesce (drain) or abrubtly end (STOP). DMTMAN then decrements the count of the active SNA session drivers. When that count is zero and the TGSVSIP flag is on, DMTMAN posts the terminate ECB for the SCT task. The SCT task calls DMTCOMDQ to dequeue any commands and then ends.