Start of change

Designing for asynchronous requests

When designing an application, you have to consider data types, passing data between successive transactions, programs, recovery, performance, security, and integrity. As an application programmer, you'll want to know which aspects that you, as the programmer, have to handle, and which are handled by CICS® processing.

Passing data between programs

When a parent task runs a child, a channel can be specified by the EXEC CICS RUN TRANSID command. All containers on the channel are copied and passed to the child (which prevents accidentally updating channel data when the child is processing). If the channel does not exist, one is created.

To ensure that the parent task can receive responses from the child task, always specify the CHANNEL option on the EXEC CICS RUN TRANSID command, even if the parent task has no data to pass to the child task.

When the parent task receives a response from the child task using EXEC CICS FETCH CHILD CHANNEL , the parent task will get a new channel named by CICS. The parent uses this new channel to receive data back from the child.
Note: An asynchronously started child task is not associated with a terminal and therefore cannot return control using the EXEC CICS RETURN TRANSID command.

Securing the parent and child tasks

The child tasks will run under the same user ID as the parent task.

Connecting the parent and children

The child tasks must run locally. They can call remote services, for example, calling web services or doing a distributed program link to another CICS region, but they must be initially local to their parent task. The child can communicate this to its children and linked-to programs. Only the parent can receive back results or child data.

Designing for recovery

Each parent and child is a separate task. There is no unit-of-work coordination by CICS between the children, nor between the parent and child.



designing_asyncapi.html | Timestamp icon Last updated: Monday, 5 June 2017
End of change