16.20 - STEPCLEAR - 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.
pStepClearEvent= MSM_CreateWEvent(pCtx,NULL);
pStepClearEvent->eventType=STEPCLEAREVENT;//set event type
pStepClearEvent->szTDPID=L”sampleTDPID”;//set TDPID
pStepClearEvent->szResourceId=L”FLOAD”;//set resource id
MSM_AddWResourceType(pCtx,pStepClearEvent,L”sampleResId”);//Add multi-argument ResourceType
pStepClearEvent->iAlertCode=TMSM_SEVERITY_CRITICAL;//set alert code	
pStepClearEvent->szJobName=L"sampleJobName";//set job name
pStepClearEvent->szJobStep=L"sampleJobStep";//set job step
status=MSM_SendWEvent(pCtx,pStepClearEvent);//send event
MSM_FreeAndClearWEventMembers(pCtx, pStepClearEvent);
//Free event. Do not forget to call this
MSM_FreeWEvent(pCtx, pStepClearEvent);
//Free Context.do not forget to call this.
TM_Free(pCtx);