Activity processing
Activity processing is organized in two activations. The first activation sets up the environment. The second activation starts when a defined external interaction occurs.
About this task
- Define an input event that depicts the external interaction. The activity cannot now complete until this input event has been dealt with.
-
Obtain an
activity identifier
that uniquely identifies
this activity-instance. To do this, it issues an ASSIGN command.
The transaction that starts the second activation must use this identifier to gain access to the activity.
- Save details of the activity identifier and input event to a suitable medium. For example, a VSAM file or IBM® MQ queue, to which the transaction that starts the second activation has access.
- Return without completing. (That is, issue an EXEC CICS® RETURN command on which the ENDACTIVITY option is omitted. Because of the user event in its event pool—the input event that it has defined—the activity does not complete but becomes dormant.)
- Retrieve the activity identifier and input event
- Gain access to the activity by issuing an ACQUIRE ACTIVITYID command that specifies the activity identifier.
- Reactivate the activity, and specify why it is being activated by issuing a RUN ACQACTIVITY command that specifies the input event.
Figure 1 shows an activity that interacts with the outside world. The first activation sets up the environment, saves details of the activity identifier and input event to a VSAM file, and returns without completing. Some time later, a user starts the SPAR transaction from a terminal. The SPAR transaction retrieves the activity identifier and input event, issues an ACQUIRE ACTIVITYID command to gain access to the activity, supplies the activity with some input data, and reactivates it.
