Returns the list of contacts. 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.
API include file
db2ApiDf.h
API and data structure syntax
SQL_API_RC SQL_API_FN
db2GetContacts (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2GetContactsData
{
db2Uint32 ioNumContacts;
struct db2ContactData *poContacts;
} db2GetContactsData;
typedef SQL_STRUCTURE db2ContactData
{
char *pName;
db2Uint32 type;
char *pAddress;
db2Uint32 maxPageLength;
char *pDescription;
} db2ContactData;
db2GetContacts 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 db2GetContactsData structure.
- pSqlca
- Output. A pointer to the sqlca structure.
db2GetContactsData data structure parameters
- ioNumContacts
- The number of poContacts.
- poContacts
- Output. A pointer to the db2ContactData structure.
The fields poContacts, pocontacts.pAddress, pocontacts.pDescription, and pocontacts.pName should be preallocated by the user with their corresponding maximum
sizes. Call db2GetContacts with numContacts=0 and poContacts=NULL to have
the required length for poContacts returned in numContacts.
db2ContactData data structure parameters
- pName
- The contact name.
- type
- Specifies the type of contact. Valid values are:
- DB2CONTACT_EMAIL
- DB2CONTACT_PAGE
- pAddress
- The address of the type parameter.
- maxPageLength
- The maximum message length for when type is set to DB2CONTACT_PAGE.
- pDescription
- 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.