How CICS web support handles pipelining

A pipelined request sequence can be sent and received by CICS®. CICS as an HTTP server can receive a pipelined request sequence from a web client, and CICS as an HTTP client can send a pipelined request sequence to a server.

CICS web support handles pipelined request sequences, and the responses to them, as follows:

  • When CICS as an HTTP server receives a pipelined sequence of HTTP requests, the requests are processed serially. This is to ensure that the responses are returned in the same order that the requests were sent. CICS treats each message in the pipelined sequence as a separate transaction, either providing a static response specified in a URIMAP definition, or passing the message to an application program and waiting for the application program to produce a response. Each transaction handles a single request and provides a response. The remaining requests in the pipelined message sequence are held by CICS until the response to the previous request is sent, and then a new transaction is initiated to process each further request.
  • When CICS as an HTTP client sends a pipelined request sequence, pipelining is enabled automatically. Each HTTP request is sent immediately, so the application program can send multiple HTTP requests before it receives any response. When the last message in the pipelined sequence has been sent, the application can begin to receive the responses.
  • When CICS as an HTTP client receives HTTP responses to a pipelined request sequence, the responses are returned to the application program in the order that CICS receives them from the server. A server that supports pipelining provides the responses in the same sequence in which the requests were received. The application program begins to receive the responses when it has finished sending all its HTTP requests.

For CICS as an HTTP client, it is the application program's responsibility to ensure that any pipelined sequence of requests is idempotent. Pipelining explains idempotency. For the benefit of your application program's logic as well as for the benefit of the server, if you are not sure that a sequence of requests is idempotent, it is advisable to make separate requests, and wait for a response to each request before sending the next one.