Terminal control

Terminal control allows communication between terminals and application programs. z/OS® Communications Server/NCP is used for most terminal data control and line control services. Terminal control supports automatic task initiation to process transactions that use a terminal but which are not directly initiated by the terminal operator (for example, printers). Terminal control can also provide a simulation of terminals, using sequential devices, to help test new applications.

Design overview

The primary function of terminal control is to take an input/output (I/O) request for a terminal and convert it to a format acceptable to the access method (z/OS Communications Server or BSAM).

The user can specify that concurrent terminal support is to be provided by any combination of the following access methods:
  • z/OS Communications Server
  • Basic sequential access method (BSAM)
  • Interregion communication (IRC)
  • Console

Terminal control uses data that describes the communication lines and terminals, kept in the terminal control table (TCT). The TCT is generated by the user as part of CICS® system definition, or dynamically as needed. The TCT entries contain terminal request indicators, status, statistics, identification, and addresses of I/O and related areas.

When CICS terminal control is used with z/OS Communications Server, z/OS Communications Server itself resides in a separate address space, having a higher priority than CICS. z/OS Communications Server-related control blocks and support programming comprise the CICS terminal control component. The application programs that run under CICS control communicate with terminals through the CICS terminal control interface with z/OS Communications Server.

z/OS Communications Server network functions allow terminals to be connected to any compatible control subsystem that is online. This enables a terminal operator to switch from one CICS system to another, or to another subsystem.

z/OS Communications Server manages the flow of data between devices in the network and z/OS Communications Server application programs such as CICS. z/OS Communications Server is responsible for:
  • Connecting, controlling, and terminating communication between the z/OS Communications Server applications and terminal logical units
  • Transferring data between z/OS Communications Server applications and logical units
  • Allowing z/OS Communications Server applications to share communication lines, communication controllers, and terminals
  • Controlling locally attached devices, that is, those not connected through a communication controller
  • Providing tools to monitor network operations and make dynamic changes to the network configuration.
In a z/OS Communications Server environment, the functions of CICS terminal control include:
  • Establishing communication with terminal logical units (LUs) by issuing logon requests, communicated through the access method
  • Handling terminal input and passing user program requests for communication to z/OS Communications Server
  • Returning terminal LUs to the access method by accepting logoff requests
  • Taking measures to ensure the integrity of messages flowing to and from z/OS Communications Server
  • Performing logical error recovery processing for z/OS Communications Server devices

Terminal control issues z/OS Communications Server macros to receive incoming messages, and routes them to the appropriate CICS application program for processing. Likewise, it sends messages destined for various devices in the network to z/OS Communications Server, which then routes them to the appropriate location.

Terminal control services
Service request facilities, system control services, and transmission facilities make up the terminal control services. For details, see Terminal control services.
Terminal error recovery
The resolution of certain conditions (for example, permanent transmission errors) involves both CICS and additional user coding. CICS cannot arbitrarily take all action with regard to these errors. User application logic is sometimes necessary to resolve the problem. For more information about terminal error handling and recovery, see Terminal error recovery.
Testing facility BSAM
To allow the user to test programs, BSAM can be used to control sequential devices, such as card readers, printers, magnetic tape, and direct-access storage devices. These sequential devices can then be used to supply input/output to CICS before actual terminals are available or during testing of new applications.
Terminal control resource managers, DFHZCP and DFHTCP
Terminal control consists of two CICS resource managers, ZCP and TCP. For details, see Terminal control resource managers, DFHZCP and DFHTCP.
The QUERY function (DFHQRY)
The QUERY function (DFHQRY) is used to determine the characteristics of IBM® 3270 Information Display System devices, and complete the information about a device in the TCTTE.

DFHQRY sends a read partition query structured field to the device, and analyzes the response. The TCTTE fields mainly affected are those used by basic mapping support (BMS), such as extended attributes. If QUERY(ALL) or QUERY(COLD) is specified in the terminal definition, DFHQRY is executed before any other transaction is initiated at a terminal. If QUERY(ALL) is specified, this is done after each logon. If QUERY(COLD) is specified, it is only done following the first logon after a cold start. After completing the TCTTE fields, DFHQRY calls DFHZCQ to recatalog the TCTTE.

Control blocks

Figure 1 shows the control blocks associated with terminal control.
Figure 1. Control blocks associated with terminal control
The first part of a diagram showing the control blocks associated with terminal control.
The second part of a diagram showing the control blocks associated with terminal control.
Figure 2 shows the TCTLE and Figure 3 shows the TACLE.
Figure 2. Terminal control table line entry (TCTLE)
Diagram showing the terminal control table line entry.
Figure 3. Terminal abnormal condition line entry (TACLE)
Diagram showing the terminal abnormal condition line entry.

Terminal input/output areas (TIOAs) are set up by storage control and chained to the terminal control table terminal entry (TCTTE) as needed for terminal input/output operations. The TCTTE contains the address of the first terminal-type storage area obtained for a task (the beginning of the chain), and the address of the active TIOA.

Modules

Module Description
DFHQRY The QUERY function.
DFHTCP DFHTCP provides the non-z/OS Communications Server support (not z/OS console support).

DFHZCP

DFHZCX

DFHZCXR

These modules provide both the common (z/OS Communications Server and non-z/OS Communications Server) interface.

The DFHZCx modules contain CSECTs that issue z/OS Communications Server macros to perform specific communication functions, and exit routines that are driven by z/OS Communications Server when network events occur that are related to CICS. For details, see Reference: DFHZCx modules with their CSECTs.

Exits

DFHZCB has three global user exit points:
  • XZCIN
  • XZCOUT
  • XZCOUT1

DFHZCP has one global user exit point, XZCATT.

DFHTCP has the following global user exit points:
  • XTCIN
  • XTCOUT
  • XTCATT
  • XTCTIN
  • XTCTOUT

Trace

The following point IDs are provided for terminal control:
  • AP 00E6 (DFHTCP), for which the trace level is TC 2
  • AP 00FC (DFHZCP), for which the trace level is TC 1
  • AP FBxx, for which the trace levels are TC 1, TC 2 and Exc
  • AP FCxx, for which the trace levels are TC 1, TC 2, and Exc
  • AP FDxx, for which the trace level is TC 1
  • AP FExx (APPC application receive requests), for which the trace levels are TC 2 and Exc.