17.10 - DBCHFER - Call-Level Interface Version 2

Teradata® Call-Level Interface Version 2 Reference for Workstation-Attached Systems

Call-Level Interface Version 2
Release Number
October 2021
English (United States)
Last Update

DBCHFER retrieves session specific error information.

The value returned by this routine is the value that was returned by the CLI service routine that encountered the error being reported on.


The values stored in the err_code structure identify what errors occurred at levels “below” CLI, that is, MTDP and MOSI.

This structure contains three error values:
  • e_class

    This class of error values defines the type of operation MTDP was performing when the error occurred. For example, EC_NETWORK.

  • e_reason

    This class of error values defines the actual error encountered by MOSI. For example, ER_LINKDOWN.

  • e_syst

    This class of error values is the value of errno (stored in e_syst by MOSI) if the error resulted from a failed system call.


DBCHFER (LogSessId, ErrPtr, MsgBuf)

where the following is true:

The parameter... Is the...
LogSessId integer logical session number assigned by CLI, if error information for a specific session is desired.
  If this value is zero, information on the last error that occurred overall is provided. The size of this argument is the integer size on the target machine.
ErrPtr four-byte pointer to a structure to receive error codes. This structure is defined in COPERR.H, and has the following format:
struct  err_code
   { int   e_class;
     int   e_reason;
     long  e_syst;

This argument is optional and should be NULL if no specific error code information is desired.

MsgBuf four-byte pointer to an 80 byte text area to receive error message text.

This argument is optional, and should be NULL if no text is desired.