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.
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 .
- 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.
| wbra_response | Default status code |
|---|---|
| Any value other than URP_OK | 400 Bad Request |
| 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 |
| encode_response | encode_reason | Default status code |
|---|---|---|
| Any value other than URP_OK
URP_OK_LOOP |
any | 501 Not Implemented |
| 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 |