db2commexitTerm API - Termination

This function frees resources that are used by the communication exit library. It can be called by both types of communication exit libraries.

This API is called by the database manager just before it unloads the communication exit library during db2stop processing. The API must be implemented in a manner so it does a complete cleanup of any resources the library holds. For instance, the API must free any memory that is allocated by the library, close files that are still open, and close network connections. The library is responsible for tracking these resources to free them.

This function is not required to be threadsafe as it is called only one time.

API header file

db2commexit.h

API and data structure syntax

SQL_API_RC ( SQL_API_FN * db2commexitTerm )
(
   char     **errormsg,
   db2int32 *errormsglen
);

db2commexitTerm API Parameters

errormsg
Output. A pointer to the address of an ASCII error message string that is allocated by the communication buffer exit library. This error messages string might be returned in this parameter if the function execution is not successful. This memory is freed by calling db2commexitFreeErrormsg.
errormsglen
Output. A pointer to an integer that indicates the length, in bytes, of the error message string in the errormsg parameter.