CAF return codes and reason codes

CAF provides the return codes either to the corresponding parameters that are specified in a CAF function call or, if you choose not to use those parameters, to registers 15 and 0.

When the reason code begins with X'00F3' except for X'00F30006', you can use the CAF TRANSLATE function to obtain error message text that can be printed and displayed. These reason codes are issued by the subsystem support for allied memories, a part of the Db2 subsystem support subcomponent that services all Db2 connection and work requests.

For SQL calls, CAF returns standard SQL codes in the SQLCA. CAF returns IFI return codes and reason codes in the instrumentation facility communication area (IFCA).

The following table lists the CAF return codes and reason codes.

Table 1. CAF return codes and reason codes
Return code Reason code Explanation
0 X'00000000' Successful completion.
4 X'00C10824' CAF reset complete. CAF is ready to make a new connection.
8 X'00C10831' Release level mismatch between Db2 and the CAF code.
2001 X'00C10201' Received a second CONNECT request from the same TCB. The first CONNECT request could have been implicit or explicit.
2001 X'00C10202' Received a second OPEN request from the same TCB. The first OPEN request could have been implicit or explicit.
2001 X'00C10203' CLOSE request issued when no active OPEN request exists.
2001 X'00C10204' DISCONNECT request issued when no active CONNECT request exists, or the AXSET macro was issued between the CONNECT request and the DISCONNECT request.
2001 X'00C10205' TRANSLATE request issued when no connection to Db2 exists.
2001 X'00C10206' Incorrect number of parameters was specified or the end-of-list bit was off.
2001 X'00C10207' Unrecognized function parameter.
2001 X'00C10208' Received requests to access two different Db2 subsystems from the same TCB.
204 2 CAF system error. Probable error in the attach or Db2.
Notes:
  1. A CAF error probably caused by errors in the parameter lists from the application programs. CAF errors do not change the current state of your connection to Db2; you can continue processing with a corrected request.
  2. System errors cause abends. If tracing is on, a descriptive message is written to the DSNTRACE data set just before the abend.