Terminal control modules (DFHZCP, DFHTCP)
Terminal control consists of two CICS® resource managers: ZCP and TCP.
- ZCP
- DFHZCP, DFHZCX, and DFHZCXR provide both the common (z/OS® Communications Server and non-z/OS Communications Server) interface, and DFHZCA, DFHZCB, DFHZCC, DFHZCW, DFHZCY, and DFHZCZ provide the z/OS Communications Server-only support.
- TCP
- DFHTCP provides the non-z/OS Communications Server support (not MVS™ console support).
Terminal control communicates with application programs, CICS system control functions (transaction manager, storage control), CICS application services (basic mapping support and data interchange program), system reliability functions (abnormal condition handling), and operating system access methods (z/OS Communications Server or BSAM).
Requests for terminal control functions made by application programs, BMS, or the transaction manager, are processed through the common interface of DFHZCP. Generally, terminal control requests for other CICS or operating system functions are issued by either ZCP or TCP, depending upon the terminal being serviced.
- DFHTCP is loaded only if TCP=YES is specified.
- DFHZCP, DFHZCX, and DFHZCXR are always loaded.
- DFHZCA, DFHZCB, DFHZCY, and DFHZCZ are loaded only if VTAM=YES is specified (VTAM® is the previous name for z/OS Communications Server).
- DFHZCC and DFHZCW are loaded only if ISC=YES is specified.

The following notes on Figure 1 relate to the common interface.
- When a terminal control request is issued by an application program, or internally by the basic mapping support (BMS) routines using the DFHTC macro, request bits are set in the user's task control area (TCA) and control is passed to the common interface (z/OS Communications Server, non-z/OS Communications Server) routines of DFHZCP.
- If the request includes WAIT and the IMMED option is not in effect, control is passed to the transaction manager to place the requesting program (task) in a suspended state. If WAIT is not included, control is returned to the requesting task.
- The task's TCA contains the TCTTE address either in a field named TCAFCAAA (facility control area associated address) or in a field named TCATPTA when passing TCATPTA to terminal control.
- The dispatcher dispatches terminal control through the common
interface (DFHZDSP in DFHZCP) for one of the following reasons:
- The system address space exit time interval (specified by the ICV system initialization parameter) has elapsed since the last terminal control dispatch.
- The specified terminal scan delay (specified by the ICVTSD system initialization parameter) has elapsed.
- There is high-performance option (HPO) work to process.
- The terminal control event has been posted complete (for example, an exit scheduled in the case of z/OS Communications Server, or an event control block (ECB) posted in the case of non-z/OS Communications Server), and CICS is about to go into a wait condition.
- Terminal control, through its common interface (DFHZDSP) requests the dispatcher to perform a CICS WAIT when the terminal control task has processed through the terminal network and has no further work that it can do.
- Terminal control communicates with storage manager to obtain and
release storage as follows:
- z/OS Communications Server
- ZCP modules issue domain calls for terminal storage (TIOAs), receive-any input area (RAIA) storage, and request parameter list (RPL) storage.
- Non-z/OS Communications Server
- DFHTCP issues DFHSC macros to obtain and release terminal and line storage.
- Terminal control communicates with the transaction manager by
means of the DFHKC macro. The macro can be issued by certain CICS control modules, depending
upon the terminal being serviced. Terminal control may request the
transaction manager to perform one of the following:
- Attach a task upon receipt of a transaction identifier from a terminal.
- Respond to a DFHKC TYPE=AVAIL request (a task control macro documented only for system programming) when a terminal is required by or for a task and that facility is available.
- Terminal control communicates with operating system access methods
in either of the following ways, depending upon the terminal being
serviced:
- z/OS Communications Server
- ZCP (referring here to the resource manager) builds z/OS Communications Server request information
in the RPL which is then passed to z/OS Communications
Server for servicing. z/OS Communications
Server notifies terminal control of completion by placing completion
information in the RPL. ZCP analyzes the contents of the RPL upon
completion to determine the type of completion and the presence of
error information. Communication with z/OS Communications
Server also occurs by z/OS Communications
Server scheduling exits, for example, LOGON or LOSTERM. z/OS Communications Server passes parameter
lists and does not always use an RPL.
When authorized-path z/OS Communications Server has been requested (HPO), communication with z/OS Communications Server also occurs in service request block (SRB) mode (using DFHZHPRX); ZCP uses the RPL with an extension to communicate with its SRB mode code. When an SRB mode RPL request is complete, ZCP calls the relevant exit or posts the ECB, as indicated by the RPL extension.
- Non-z/OS Communications Server
- DFHTCP builds access method requests in the data event control block (DECB), which is part of the terminal control table line entry (TCTLE). The DECB portion of the TCTLE is passed to the access method by terminal control to request a service of that access method. The access method notifies terminal control of the completion of the service through the DECB. Terminal control analyzes the contents of the DECB upon completion to determine the type of completion and to check for error information.
- Terminal control communicates with the CICS abnormal condition functions in either
of the following ways, depending upon the terminal being serviced:
- z/OS Communications Server
- The activate scan routine (DFHZACT, in the DFHZCA load module) attaches the CSNE transaction to run the node abnormal condition program (DFHZNAC); this is done during CICS initialization. DFHZNAC does some preliminary processing and then passes control to the node error program (DFHZNEP). (The node error program can be either your own version or the default CICS-supplied version.) Upon the completion of the user's error processing, control is returned to DFHZNAC. (For further information about DFHZNAC, see Node abnormal condition program.)
- Non-z/OS Communications Server
- DFHTCP attaches the CSTE transaction to run the terminal abnormal condition program (TACP) and passes a terminal abnormal condition line entry (TACLE) when an error occurs. The TACLE is a copy of the DECB portion of the TCTLE and contains all information necessary for proper evaluation of the error, together with special action indicators that can be manipulated to alter the error correction procedure. After analyzing the DECB, DFHTACP calls the terminal error program (DFHTEP) with a COMMAREA containing the TACLE address. (The terminal error program can be either your own version or the default CICS-supplied version.) For further information about DFHTACP, see Terminal abnormal condition program.
- Terminal control is executed under either the user's TCA or its
own TCA as follows:
- User's TCA
- During the application program interface
- During the interface with basic mapping support
- While performing direct z/OS Communications Server terminal SEND requests.
- Terminal control's TCA
- When the dispatcher dispatches terminal control
- When terminal control issues a request to the transaction manager to attach a task
- When terminal control issues a request to storage control
- While performing non-z/OS Communications Server terminal I/O or queued z/OS Communications Server terminal I/O
- For session-control functions when no task is attached.
Because many devices are supported by CICS terminal control, a large number of modules are required to provide this support.



