IBM Books

Administrative API Reference

db2AdminMsgWrite

Provides a mechanism for users and Replication to write information to db2diag.log and the Windows NT event log. In the case of DB2 Satellite Edition, messages are logged to the notification files instead of the Windows NT event log.

This API is available on Windows NT, Windows 98, and Windows 95 only.

Authorization

None

Required Connection

None

Version

db2ApiDf.h

C API Syntax



/* File: db2ApiDf.h */
/* API: db2AdminMsgWrite */
/* ... */
SQL_API_RC  SQL_API_FN
  db2AdminMsgWrite (
    db2Uint32 versionNumber,
    void * pParmStruct,
    struct sqlca * pSqlca);
 
typedef struct
{
  db2Uint32 iMsgType;
  db2Uint32 iComponent;
  db2Uint32 iFunction;
  db2Uint32 iProbeID;
  char * piData_title;
  void * piData;
  db2Uint32 iDataLen;
  db2Uint32 iError_type;
} db2AdminMsgWriteStruct;
/* ... */
 

API Parameters

versionNumber
Input. Specifies the version and release level of the structure passed in as the second parameter, pParmStruct.

pParmStruct
Input. A pointer to the db2AdminMsgWriteStruct structure.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

iMsgType
Input. Specify the type of data to be logged. Valid values are BINARY_MSG for binary data, and STRING_MSG for string data.

iComponent
Input. Specify zero.

iFunction
Input. Specify zero.

iProbeID
Input. Specify the numeric probe point.

piData_title
Input. A pointer to the title string describing the data to be logged. Can be set to NULL if a title is not needed.

piData
Input. A pointer to the data to be logged. Can be set to NULL if data logging is not needed.

iDataLen
Input. The number of bytes of binary data to be used for logging if iMsgType is BINARY_MSG. Not used if iMsgType is STRING_MSG.

iError_type
Input. Valid values are:
   DB2LOG_SEVERE_ERROR   (1) - Severe error has occurred
   DB2LOG_ERROR          (2) - Error has occurred
   DB2LOG_WARNING        (3) - Warning has occurred
   DB2LOG_INFORMATION    (4) - Informational

Usage Notes

This API will log to notification files or to the Windows NT event log only if the specified error type is less than or equal to the value of the notifylevel database manager configuration parameter. It will log to db2diag.log only if the specified error type is less than or equal to the value of the diaglevel database manager configuration parameter.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]