Web error programs

When a request error or an abend occurs in the CICS® web support process, a user-replaceable web error program provides an error response to the web client.

Attention: This topic contains Product-sensitive Programming Interface and Associated Guidance Information.
A web error program is used in the following situations:
  • When CICS web support detects a problem in initial processing of a request from a web client; for example, if required information is missing from the request, or if the request is sent too slowly and the receive timeout is reached.
  • When an installed URIMAP definition matches the request, but the URIMAP definition or virtual host is disabled, or the resource for a static response cannot be accessed.
  • When URIMAP matching fails, and the analyzer specified for the TCPIPSERVICE definition cannot process the request and passes control to a web error program.
  • When neither the URIMAP definition, nor the analyzer and converter program processing, can determine which application program will service the request.
  • When an abend occurs in the analyzer program, converter program, or user-written application program, ensuring that a response can be returned to the web client even though processing has failed.
A web error program is not used in the following situations:
  • When a sockets send or receive error occurs. The socket is closed and no response is sent to the web client.
  • When a URIMAP specifies a redirection response. These responses are composed by CICS and are not customizable.
  • When a user-written application program completes processing successfully and wants to return a response indicating an error; for example, if the client has specified a method not supported for the resource. These responses are composed and sent by the application.
  • For processing involving CICS as an HTTP client. Web clients are not required to send an error response to servers. Responses received from servers are handled by the client application program.
  • With the EXEC CICS WEB RECEIVE command. The content that is received might be potentially damaging. The subtopics tell you more.

If CICS has a persistent connection with the client, CICS keeps the connection open after an error response is sent through a web error program. The exception is when CICS selects the 501 (Method Not Implemented) status code for the response, in which case the connection is closed by CICS.

For general information about writing user-replaceable programs, see Customizing with user-replaceable programs.

Two user-replaceable web error programs are provided with CICS: