16.20 - CLEAR - Teradata Ecosystem Manager

Teradata® Ecosystem Manager API Reference

prodname
Teradata Ecosystem Manager
vrm_release
16.20
created_date
December 2020
category
Programming Reference
featnum
B035-3204-107K
#include <tmsmapi.h>
//initialize Api
pCtx = TM_Init();
//Create Event placeholder.
pClearEvent= MSM_CreateWEvent(pCtx,NULL);
pClearEvent->eventType=CLEAREVENT;//set event type
pClearEvent->szTDPID=L”sampleTDPID”;//set TDPID
pClearEvent->szResourceId=L”sampleResId”;//set resourceid
MSM_AddWResourceType(pCtx, pEndEvent,L”sampleResType”);	//Add multi-argument resourceType			
pEndEvent ->szJobStep = L”sampleJS”;//set job step	
pAlertEventOnProcess->iAlertCode=50;//set alert code
status=MSM_SendWEvent(pCtx, pEndEvent);//send event
MSM_FreeAndClearWEventMembers(pCtx, pClearEvent);
//Free event. Do not forget to call this
MSM_FreeWEvent(pCtx, pClearEvent);
//Free Context.do not forget to call this.
TM_Free(pCtx);