16.20 - TBLSTATE - Teradata Ecosystem Manager

Teradata® Ecosystem Manager API Reference

Product
Teradata Ecosystem Manager
Release Number
16.20
Published
December 2020
Language
English (United States)
Last Update
2020-12-23
dita:mapPath
loa1512743917841.ditamap
dita:ditavalPath
ft:empty
#include <tmsmapi.h>
//initialize Api

pCtx = TM_Init();
//Create Event placeholder.
pTableStateEvent = MSM_CreateWEvent(pCtx,NULL);

pTableStateEvent->eventType=TBLSTATEEVENT;//set event type
pTableStateEvent->szTDPID=L”sampleTDPID”;//set TDPID				
pTableStateEvent->iStateCode=10;//set statecode				
MSM_AddWDatabase(pCtx,pTableStateEvent,L"SampleDatabase");//Add multi-argument database
MSM_AddWTable(pCtx,pTableStateEvent,L"SampleTable");//Add multi-argument table
status=MSM_SendWEvent(pCtx,pTableStateEvent);//send event

MSM_FreeAndClearWEventMembers(pCtx, pTableStateEvent);
//Free event. Do not forget to call this
MSM_FreeWEvent(pCtx, pTableStateEvent);
//Free Context.do not forget to call this.
TM_Free(pCtx);