DISCARD TERMINAL

Remove a TERMINAL definition.

DISCARD TERMINAL

Read syntax diagramSkip visual syntax diagramDISCARD TERMINAL( data-value)

Conditions: INVREQ, NOTAUTH, TERMIDERR

Description

The DISCARD TERMINAL command removes the definition of a terminal from the local CICS system, so that the system no longer has access to the terminal; that is, it deletes a TERMINAL resource definition of the same name which was installed explicitly, installed automatically, or shipped by another CICS which routed a transaction to the local CICS.

To be eligible for discard, a terminal defined as local must be either a VTAM terminal or a console, it must be in out-of-service status, and it cannot be the CICS-defined error console CERR. A remote terminal cannot be in use by the local system (that is, it cannot be the principal facility of a task there). Sessions on a connection cannot be discarded with a DISCARD TERMINAL command, even if they were installed via a TERMINAL resource definition. You must use DISCARD CONNECTION instead.

CICS completes successful DISCARD TERMINAL processing with an implicit syncpoint on behalf of the issuing task, committing changes to recoverable resources made up to that point in the task. If the discard processing fails, CICS raises the INVREQ exception condition with a RESP2 value of 43, and does a SYNCPOINT ROLLBACK instead, rolling back changes to recoverable resources. In all other exception situations, however, discard processing is not attempted and neither SYNCPOINT nor SYNCPOINT ROLLBACK is issued.

See Discarding resource definitions for general information about discards.

Options

TERMINAL(data-value)
specifies the 4-character name of the terminal whose definition is to be discarded.

Conditions

INVREQ
RESP2 values:
33
The terminal is an APPC session or device.
38
The terminal type is neither VTAM nor console.
39
The terminal is local and not out-of-service.
40
The terminal is the system error console.
41
The terminal is an MRO session.
43
Delete processing failed.
44
The terminal is remote and is in use locally.
45
The TERMINAL definition is in use.
46
Discard of this TERMINAL definition is already in progress.
200
The command was executed in a program defined with an EXECUTIONSET value of DPLSUBSET or a program invoked from a remote system by a distributed program link without the SYNCONRETURN option.
NOTAUTH
RESP2 values:
100
The user associated with the issuing task is not authorized to use this command.
TERMIDERR
RESP2 values:
23
The terminal cannot be found