CICS web support default status codes and error responses

The response code and reason code set by an analyzer or converter program map to default status codes and associated responses. CICS® also selects a default status code and associated response if an error occurs when a static response is produced using a URIMAP definition. The status code and response can be modified by the user-replaceable web error program DFHWBEP.

Attention: This topic contains Product-sensitive Programming Interface and Associated Guidance Information.

The HTTP protocol specifications define status codes that a server can return for the HTTP response when a request cannot be completed successfully. Refer to HTTP status code reference for CICS web support .

When an error occurs during CICS web support processing, information is passed to the web error program DFHWBEP in a parameter list to assist in determining an appropriate error response:
  • If an error occurs during processing by an analyzer or converter program, you can identify the error using the response and reason codes from the program in the parameter list.
  • If an error occurs in producing a static response using a URIMAP definition, you can identify the error using the associated CICS message number and text in the parameter list.

For all types of error, a complete default error response, including the status code, is passed to the web error program to be accepted, modified, or replaced. Error responses are accompanied by a CICS message and an exception trace entry.

The default status codes are as follows.

Table 1. Default status code for analyzer program processing error
wbra_response Default status code
Any value other than URP_OK 400 Bad Request
Table 2. Default status codes for the converter decode function
decode_response decode_reason Default status code
URP_EXCEPTION URP_CORRUPT_CLIENT_DATA 400 Bad Request
URP_EXCEPTION URP_SECURITY_FAILURE 403 Forbidden
URP_EXCEPTION any other value 501 Not Implemented
URP_INVALID any value 501 Not Implemented
URP_DISASTER any value 501 Not Implemented
any other value any value 500 Internal Server Error
Table 3. Default status codes for the converter encode function
encode_response encode_reason Default status code
Any value other than
URP_OK
URP_OK_LOOP
any 501 Not Implemented
Table 4. Default status codes for static response processing errors (using a URIMAP definition)
CICS message number Error Default status code
0364 An attempt to establish security for the user ID has failed. 403 Forbidden
0758 User does not have READ access to the resource needed to produce the static response (CICS document template or z/OS® UNIX file). 403 Forbidden
0759 The resource needed to produce the static response cannot be found (CICS document template or z/OS UNIX file). 404 Not Found
0760 The z/OS UNIX file needed to produce the static response cannot be read. 500 Internal Server Error
0761 Any other error. 500 Internal Server Error