Check the completion status of a BTS activity.

CHECK ACTIVITY
>>-CHECK--+-ACTIVITY(data-value)-+--COMPSTATUS(cvda)------------>
'-ACQACTIVITY----------'
>--+-------------------+--+----------------------+-------------->
'-ABCODE(data-area)-' '-ABPROGRAM(data-area)-'
>--+------------+--+------------------+------------------------><
'-MODE(cvda)-' '-SUSPSTATUS(cvda)-'
Conditions: ACTIVITYBUSY, ACTIVITYERR, INVREQ, IOERR,
LOCKED
Description
CHECK ACTIVITY returns the completion status of a BTS activity. Typically,
it is used to check the success of a previous RUN ACTIVITY or LINK ACTIVITY
command. It allows the requestor to discover whether an activity completed
successfully, or whether, for example, it needs to be reactivated in order
to complete its processing.
CHECK ACTIVITY can be issued:
- By a parent activity, to check the completion status of one of its children
- By a program that has acquired an activity by means of an ACQUIRE ACTIVITYID
command.
It can be used to check descendant (not root) activities:
- That have completed
- That have not completed
- That were requested to run asynchronously
- That were requested to run synchronously.
The RESP and RESP2 options on this command reflect whether the command
is understood by CICS®—for example, ACTIVITYERR occurs if the child
named on the ACTIVITY option has not been defined to the parent.
The COMPSTATUS option returns a CVDA value indicating the completion status
of the activity—for example, NORMAL is returned if the activity has
successfully completed all its processing steps, while INCOMPLETE is returned
if it has returned from an activation but needs to be reattached in order
to complete its processing.
If this command is issued by a parent activity in respect of one of its
children, and the child has completed, on return from the command CICS deletes
the child's completion event from the parent's event pool.
For further guidance on the use of the CHECK ACTIVITY command, see the CICS Business Transaction Services manual.
Options
- ABCODE(data-area)
- returns, if the activity terminated abnormally, the 4-character abend
code.
- ABPROGRAM(data-area)
- returns, if the activity terminated abnormally, the 8-character name
of the program that was in control at the time of the abend.
- ACQACTIVITY
- specifies that the activity to be checked is the one that the current unit of work has
acquired by means of an ACQUIRE ACTIVITYID command.
- ACTIVITY(data-value)
- specifies the name (1–16 characters) of the activity to be checked.
Use this option to check the state of a child of the current activity.
- COMPSTATUS(cvda)
- indicates the completion status of the activity. CVDA values are:
- ABEND
- The program that implements the activity abended. Any children of the
activity have been canceled.
The activity's completion event is deleted
from the parent's event pool.
- FORCED
- The activity was forced to complete—for example, it was canceled
with a CANCEL ACTIVITY command.
The activity's completion event is
deleted from the parent's event pool.
- INCOMPLETE
- The named activity is incomplete. This could mean:
- That it has not yet been run
- That it has returned from one or more activations but needs to be reattached
in order to complete all its processing steps
- That it is currently active.
The activity's completion event is not deleted
from the parent's event pool.
- NORMAL
- The named activity completed successfully.
The activity's completion
event is deleted from the parent's event pool.
- MODE(cvda)
- indicates the processing state of the activity. CVDA values are:
- ACTIVE
- An activation of the activity is running.
- CANCELLING
- CICS is waiting to cancel the activity. A CANCEL ACTIVITY command has
been issued, but CICS cannot cancel the activity immediately because one or
more of the activity's children are inaccessible.
- COMPLETE
- The activity has completed.
- DORMANT
- The activity is waiting for an event to fire its next activation.
- INITIAL
- No RUN or LINK command has yet been issued against the activity; or
the activity has been reset by means of a RESET ACTIVITY command.
- SUSPSTATUS(cvda)
- indicates whether the activity is currently suspended. CVDA values are:
- SUSPENDED
- The activity is currently suspended. If a reattachment event occurs,
it will not be reactivated.
- NOTSUSPENDED
- The activity is not currently suspended. If a reattachment event occurs,
it will be reactivated.
Conditions
- ACTIVITYBUSY
- RESP2 values:
- 19
- The request timed out. It may be that another task using this activity-record
has been prevented from ending.
- ACTIVITYERR
- RESP2 values:
- 8
- The activity named in the ACTIVITY option could not be found.
- 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.
- 24
- The ACQACTIVITY option was used, but the unit of work that issued the request
has not acquired an activity.
- IOERR
- RESP2 values:
- 29
- The repository file is unavailable.
- 30
- An input/output error has occurred on the repository file.
- LOCKED
- The request cannot be performed because a retained lock exists against
the relevant record on the repository file.