DBCHFERL - Call-Level Interface Version 2

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

Product
Call-Level Interface Version 2
Release Number
16.20
Published
September 2019
Language
English (United States)
Last Update
2019-10-12
dita:mapPath
uny1527114222311.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2418
lifecycle
previous
Product Category
Teradata Tools and Utilities

DBCHFERL (Fetch Error Localized) is an extension of DBCHFER. This routine has an additional capability of returning the session-specific error information in localized form. Messages are returned by CLI, in the message buffer provided by the application, in the specified language. The length of the message returned depends on the size of the buffer allocated. The value returned by this routine is the value that was returned by the CLI service routine that encountered the error being reported.

Parameters

Int32 DBCHFERL
  • (int LogSessId,
  • register errpt_t Err,
  • char*msgbuf,
  • unsigned short ibuflen,
  • unsigned short * obuflen,
  • short * msgerr)
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

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 pointer to a buffer for placing error message. Allocated by the application.
ibuflen size of the message buffer allocated by the application
obuflen length of the message returned by CLI, in application-provided buffer
msgerr Indicating error, if one occurred while building the message.
  • -1 = Application failed to provide a valid buffer
  • 1 = Error message is truncated
  • 0 = Successfully build the message