15.10 - Teradata Error and Failure Codes - Call-Level Interface Version 2

Teradata Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Call-Level Interface Version 2
Programming Reference

Teradata Database uses error codes and failure codes to provide information about operations. The absence of an Error parcel or StatementError Parcel represents an error code of zero. The absence of a Failure parcel represents a failure code of zero. An Error parcel, StatementError parcel, or Failure parcel contains a nonzero code and represents an exception. For more information, see Chapter 10: “Error and Failure Codes” and Chapter 11: “Crash and Recovery.”

Sometimes, both client and Teradata Database sources must be checked. For instance, on a call to DBCHCL for the Fetch function, a return code of zero means that the client software has set a pointer to information in the response buffer. Not until the information is examined does the application know what the Teradata Database “has to say.” For example, the return code may be zero and the parcel successfully pointed to may be a Failure parcel.

A code value represents the answer to a particular repeat of a particular operation. For instance, suppose CLIv2 is obtaining a response buffer and Teradata Database is unable to provide more of the response because the system has restarted. The application would then discover a Failure parcel in the response buffer after a number of normal parcels.