CANCEL (BTS)

Cancel a BTS activity or process.

CANCEL (BTS)

Read syntax diagramSkip visual syntax diagramCANCELACTIVITY( data-value)ACQACTIVITYACQPROCESS

Conditions: ACTIVITYBUSY, ACTIVITYERR, INVREQ, IOERR, LOCKED, NOTAUTH, PROCESSBUSY, PROCESSERR

Description

CANCEL (BTS) forces a BTS activity or process, and all its descendant activities, into COMPLETE mode.

Options

ACQACTIVITY
specifies that the activity to be canceled is the one that the current unit of work has acquired by means of an ACQUIRE ACTIVITYID command.
ACQPROCESS
specifies that the process that the current unit of work has acquired is to be canceled.
ACTIVITY(data-value)
specifies the name (1–16 characters) of the child activity to be canceled.

Conditions

107 ACTIVITYBUSY
RESP2 values:
19
One or more of the descendant activities of the activity to be canceled are inaccessible or in CANCELLING mode.
109 ACTIVITYERR
RESP2 values:
8
The activity named on the ACTIVITY option could not be found.
14
The activity to be canceled is not in INITIAL or DORMANT mode.
16 INVREQ
RESP2 values:
4
The ACTIVITY option was used to name a child activity, but the command was issued outside the scope of a currently-active activity.
15
The ACQPROCESS option was used, but the issuing task has not acquired a process.
24
The ACQACTIVITY option was used, but the issuing task has not acquired an activity.
17 IOERR
RESP2 values:
29
The repository file is unavailable.
30
An input/output error has occurred on the repository file.
100 LOCKED
The request cannot be performed because a retained lock exists against the relevant record on the repository file.
70 NOTAUTH
RESP2 values:
101
The user associated with the issuing task is not authorized to access the file associated with the BTS repository data set on which details of the process or activity are stored.
106 PROCESSBUSY
RESP2 values:
13
One or more of the activities that make up the process to be canceled are inaccessible or in CANCELLING mode.
108 PROCESSERR
RESP2 values:
9
The process—type could not be found.
14
The process to be canceled is not in INITIAL, DORMANT, or COMPLETE mode.

Activities

The only activities a program can cancel are as follows:
  • If it is running as the activation of an activity, its own child activities. It can cancel several of its child activities within the same unit of work.
  • The activity it has acquired, by means of an ACQUIRE ACTIVITYID command, in the current unit of work.
To be canceled successfully, an activity must be in INITIAL or DORMANT mode. CICS® tries to cancel activities synchronously. However, if one or more descendant activities of the activity to be canceled are inaccessible (due, for example, to the failure of a communications link):
  • The subtree of descendant activities is canceled asynchronously.
  • The activity to be canceled is placed in CANCELLING mode.

The completion event associated with a canceled activity is not deleted from the parent's event pool. On normal completion of this command, the activity still exists, and can be reset and run again, if necessary.

When an acquired activity is canceled, its parent is reactivated because of the firing of the canceled activity's completion event.

Processes

The only process a program can cancel is the one it has acquired in the current unit of work. If it does so, it cannot acquire another process within the current unit of work.

To be canceled successfully, a process must be in INITIAL, DORMANT, or COMPLETE mode.

CICS tries to cancel the process synchronously, in the way described for activities.