Follow this task to see how to transfer data between a parent and a child activity. The
task uses the Delivery activity Sale application as an example.
About this task
The DFH0SAL2 root activity creates the Delivery child activity by issuing a DEFINE
ACTIVITY command.
The GET CONTAINER command retrieves
the data returned by the Order activity, and places it in a storage
buffer. The data is retrieved from the output data-container of the
Order activity, which is named Order.
Note: A
child activity's data-containers are accessible to its parent even
after the child has completed. An activity's containers are only destroyed
when the activity itself is destroyed. An activity is destroyed:
Automatically by CICS®, when its parent completes.
Before this, if its parent issues a DELETE ACTIVITY command
against it.
The PUT CONTAINER command associates
a data-container (also named Order) with the Delivery activity,
and places the retrieved data in it.
The implementation of the
Delivery activity is shown in Figure 2.
The Delivery activity issues a GET CONTAINER command
to retrieve data from a data-container named Order. Because
the command does not specify the ACTIVITY option, it references a
data-container associated with the current activity; in other words,
it references the same Order data-container as that referenced
by the PUT CONTAINER command in Figure 1.
The Delivery activity uses
the input data to execute its logic. Then it issues a PUT
CONTAINER command to store its output in a data-container
named Delivery. Again, the ACTIVITY option is not specified,
so the data-container is associated with the current (Delivery) activity.