db2AddContact API - Add a contact to whom notification messages can be sent

Adds a contact to the contact list. Contacts are users to whom notification messages can be sent. Contacts can be either defined locally on the system or in a global list. The setting of the Db2® administration server (DAS) configuration parameter, contact_host, determines whether the list is local or global.

Authorization

None

Required connection

None

API include file

db2ApiDf.h

API and data structure syntax

SQL_API_RC SQL_API_FN
  db2AddContact (
   db2Uint32 versionNumber,
   void * pParmStruct,
   struct sqlca * pSqlca);

typedef SQL_STRUCTURE db2AddContactData
{
   char *piUserid;
   char *piPassword;
   char *piName;
   db2Uint32 iType;
   char *piAddress;
   db2Uint32 iMaxPageLength;
   char *piDescription;
} db2AddContactData;

db2AddContact API parameters

versionNumber
Input. Specifies the version and release level of the structure passed as the second parameter pParmStruct.
pParmStruct
Input. A pointer to the db2AddContactData structure.
pSqlca
Output. A pointer to the sqlca structure.

db2AddContactData data structure parameters

piUserid
Input. The user name.
piPassword
Input. The password for the user ID specified by parameter piUserid.
piName
Input. The contact name.
iType
Input. Specifies the type of contact. Valid values are:
  • DB2CONTACT_EMAIL
  • DB2CONTACT_PAGE
piAddress
Input. The email or pager address of the iType parameter.
iMaxPageLength
Input. The maximum message length for when iType is set to DB2CONTACT_PAGE.
piDescription
Input. User supplied description of the contact.

Usage notes

This API is not supported on UNIX and Linux®. However, you can access the same functionality through the SQL interface.