DB2 Version 10.1 for Linux, UNIX, and Windows

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

Adds a new contact group to the list of contact groups. A contact group contains a list of users to whom notification messages can be sent. Contact groups 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
  db2AddContactGroup (
   db2Uint32 versionNumber,
   void * pParmStruct,
   struct sqlca * pSqlca);

typedef SQL_STRUCTURE db2AddContactGroupData
{
   char *piUserid;
   char *piPassword;
   char *piGroupName;
   char *piDescription;
   db2Uint32 iNumContacts;
   struct db2ContactTypeData *piContacts;
} db2AddContactGroupData;

typedef SQL_STRUCTURE db2ContactTypeData
{
   db2Uint32 contactType;
   char *pName;
} db2ContactTypeData;

db2AddContactGroup 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 db2AddContactGroupData structure.
pSqlca
Output. A pointer to the sqlca structure.

db2AddContactGroupData data structure parameters

piUserid
Input. The user name.
piPassword
Input. The password for piUserid.
piGroupName
Input. The name of the group to be retrieved.
piDescription
Input. The description of the group.
iNumContacts
Input. The number of piContacts.
piContacts
A pointer to the db2ContactTypeData structure.

db2ContactTypeData data structure parameters

contactType
Specifies the type of contact. Valid values are:
  • DB2CONTACT_SINGLE
  • DB2CONTACT_GROUP
pName
The contact group name, or the contact name if contactType is set to DB2CONTACT_SINGLE.

Usage notes

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