CANCEL

Cancel interval control requests.

CANCEL

Read syntax diagramSkip visual syntax diagramCANCELREQID( name)SYSID( systemname)TRANSID( name)

Conditions: ISCINVREQ, NOTAUTH, NOTFND, SYSIDERR

Note for dynamic transaction routing: Using CANCEL with REQID (of a POST, DELAY, or START) could create inter-transaction affinities that adversely affect the use of dynamic transaction routing. For more information about transaction affinities, see Affinity

Description

CANCEL cancels a previously issued DELAY, POST, or START command. The CANCEL command cannot be used to remove a request that is queued locally. If you include the SYSID option, the command is shipped to a remote system. If you omit SYSID, the TRANSID option, if present, indicates where the command is to be executed. The effect of the cancellation varies depending on the type of command that is being canceled, as follows:
  • A DELAY command can be canceled only before it expires, and only by a task other than the task that issued the DELAY command (which is suspended for the duration of the request). The REQID used by the suspended task must be specified. The effect of the cancellation is the same as an early expiration of the original DELAY. That is, the suspended task becomes dispatchable as though the original expiration time was reached.
  • When a POST command that is issued by the same task is to be canceled, no REQID need be specified. Cancellation can be requested either before or after the original request has expired. The effect of the cancellation is as if the original request was never made.
  • When a POST command that is issued by another task is to be canceled, the REQID of that command must be specified. The effect of the cancellation is the same as an early expiration of the original POST request. That is, the timer event control area for the other task is posted as though the original expiration time was reached.
  • When a START command is to be canceled, the REQID associated with the original command must be specified. The effect of the cancellation is as if the original command was never issued. The cancellation is effective only before the original command is honored.
  • When you use a START command with the PROTECT option, CANCEL cancels the START command only if the START command is committed.
Note: A NOTFND response to a CANCEL command of a START with REQID signifies that the start request is no longer outstanding. It does not imply that the task to be started has completed by this point in time; neither does it imply that the started task issued a RETRIEVE command to read the FROM data from the REQID queue. A subsequent START command that reuses the same REQID value can fail with an AEIQ abend (IOERR condition), if the REQID queue still exists at this time.

Options

REQID(name)
This option specifies a name (1–8 characters), which should be unique, to identify a command. This name is used as a temporary storage identifier. The temporary storage queue that is thus identified must be defined as a local queue on the CICS® system where the CANCEL command is processed.

This option cannot be used to cancel a POST command that is issued by the same task (for which, the REQID option is ignored if it is specified).

SYSID(systemname)
(remote systems only) This option specifies the name (1–4 characters) of the system for the CANCEL command.
TRANSID(name)
This option specifies the symbolic identifier (1–4 characters) of a transaction to be used to determine where the CANCEL command is to be executed, if SYSID is not specified. If the TRANSID is defined as REMOTE, the CANCEL request is function-shipped to the remote system.

Conditions

54 ISCINVREQ
This condition occurs when the remote system indicates a failure that does not correspond to a known condition.

Default action: terminate the task abnormally.

70 NOTAUTH
This condition occurs when a resource security check fails on the specified TRANSID or on the TRANSID of the START command that corresponds to the request identification.

Default action: terminate the task abnormally.

13 NOTFND
This condition occurs if the request identifier specified fails to match an unexpired interval control command.

Default action: terminate the task abnormally.

53 SYSIDERR
This condition occurs when the SYSID option specifies a name that is not the local system or a remote system (made known to CICS by defining a CONNECTION). It also occurs when the link to the remote system is closed.

Default action: terminate the task abnormally.