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 URIMAP matching fails, and the analyzer specified for the
TCPIPSERVICE definition is unable to process the request and passes
control to a Web error program.
- When neither the URIMAP definition, nor the analyzer and converter
program processing, manages to determine what application program
should be executed to service the request.
- When an abend occurs in the analyzer program, converter program,
or user-written application program. This ensures 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. In this case, the
socket is closed and no response is sent to the Web client.
When an installed URIMAP definition matches the request,
but the URIMAP definition or virtual host is disabled.
- When a URIMAP specifies a redirection response. These responses
are composed by CICS and are not customizable.
- When a user-written application program has completed 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.
If there is 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 where CICS selects
the 501 (Method Not Implemented) status code for the response, in
which case the connection is closed by CICS.
Two user-replaceable Web error programs are provided with CICS:
- DFHWBERX (Web error application program)
- DFHWBERX can be specified as an application program to handle
a request, by an analyzer program or in a URIMAP definition. It is
used when the CICS-supplied default analyzer DFHWBAAX is specified
as the analyzer program on the TCPIPSERVICE definition, and no matching
URIMAP definition is found for a request. The EXEC CICS WEB
and DOCUMENT application programming interfaces are available from
DFHWBERX. It uses the EXEC CICS commands to obtain information
about the Web client's request and create and send the error response.
- DFHWBEP (Web error program)
- DFHWBEP is used in all other situations where a Web error program
is required, that is, when CICS detects an error in request
processing.
CICS provides
DFHWBEP with a parameter list giving information about the error situation,
and a default error response in a block of storage. DFHWBEP can use
the EXEC CICS WEB and DOCUMENT API commands to create
its own error response and send it to the Web client, or it can amend
or accept the default error response provided by CICS.
For more information about writing user-replaceable programs, see
the CICS Customization Guide.