16.20 - RQ_STATE - 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.
pRequestStateEvent = MSM_CreateWEvent(pCtx,NULL);
pRequestStateEvent->szResourceId=TMSM_WRESOURCETYPE_FLOAD;//set resource-id
pRequestStateEvent->eventType=RQ_STATEEVENT;//set event type
pRequestStateEvent->szTDPID=L”sampleTDPID”;//set TDPID
pRequestStateEvent->iStateCode=10;//set statecode
MSM_AddWResourceType(pCtx,pRequestStateEvent,L”FLOAD”);
//Add multi-argument resourceType
status=MSM_SendWEvent(pCtx,pRequestStateEvent);//send event
MSM_FreeAndClearWEventMembers(pCtx, pRequestStateEvent);
//Free event. Do not forget to call this
MSM_FreeWEvent(pCtx, pRequestStateEvent);
//Free Context.do not forget to call this.
TM_Free(pCtx);