CICS as a service provider
For CICS to provide a service to an external service requester, it must receive the service request and pass it through a pipeline to the target application program. The response from the application is returned to the service requester through the same pipeline.
Figure 1 shows an example configuration of the architecture and resources that are required to process a request from an external service requester when CICS is a service provider using a Java pipeline.
- Receive the request from the service requester.
The TCPIPSERVICE resource specifies a port for incoming requests. This port is monitored by the CICS-supplied sockets listener transaction (CSOL).
- Examine the request, and extract the contents that are relevant to the target application
program.
When the request message is received on the appropriate port, the URIMAP resource definitions are scanned for a URIMAP definition that has its USAGE attribute set to PIPELINE and its PATH attribute set to the URI found in the request. If an appropriate URIMAP definition is found, the PIPELINE and WEBSERVICE definitions from the PIPELINE and WEBSERVICE attributes of the URIMAP definition are used. The TRANSACTION attribute of the URIMAP definition determines the name of the transaction that should be attached to process the pipeline. By default the CPIH transaction is used. The URIMAP definition also identifies the PIPELINE and WEBSERVICE resources to use. These resources control the processing that CICS performs.
- Invoke the application program, passing data extracted from the request.
The message handlers in the pipeline and the application handler convert the request message into application language structure that the service provider application program expects. The program processes this input and returns a response to the application handler.
- Construct a response using data returned by the application program, and send a response to the
service requester.
The application handler and message handlers convert the response message received from the service provider application into a message in the format of the original request. This message is sent back to the service requester.