# EssOtlGetEnabledDTSMembers

Description

EssOtlGetEnabledDTSMembers() retrieves the member information structures for the enabled Dynamic Time Series (DTS) members in the specified outline.

Syntax

    ESS_STS_T EssOtlGetEnabledDTSMembers (hOutline, pusCount, ppEnabledDTSMemberList);

ESS_HOUTLINE_T | hOutline
ESS_PUSHORT_T | pusCount
ESS_PPDTSMBRINFO_T | ppEnabledDTSMemberList

Parameters

hOutline | The Essbase outline handle returned from the EssOtlOpenOutline() call.
pusCount | The number of enabled DTS Members.
ppEnabledDTSMemberList | Pointer to an array of DTS member info structures (for the enabled DTS members for the outline).

Return Value

If successful the return value is zero. Otherwise, returns the status of the EssOtlQueryMembers() call.

Notes

- This function also fills in the ESS_DTSMBRNAME_T structure passed to it.

Example

    #include "essapi.h"
    #include "essotl.h"
    #include "esserror.h"

    ESS_STS_T ESS_OtlGetEnabledDTSMembers(ESS_HCTX_T hCtx)
    {
    	ESS_STS_T 	sts =ESS_STS_NOERR;
    	ESS_HOUTLINE_T	hOutline;
    	ESS_OBJDEF_T	Object;
    	ESS_APPNAME_T	szAppName;
    	ESS_DBNAME_T	szDbName;
    	ESS_OBJNAME_T	szFileName;
    	ESS_USHORT_T	usCount, i;
    	ESS_PDTSMBRNAME_T	pEnabledDTSMbrList;

    	strcpy(szAppName, "Sample");
    	strcpy(szDbName, "Basic");
    	strcpy(szFileName, "Basic");

    	memset(&Object, '\0', sizeof(ESS_OBJDEF_T));
    	Object.hCtx = hCtx;
    	Object.ObjType = ESS_OBJTYPE_OUTLINE;
    	Object.AppName = szAppName;
    	Object.DbName = szDbName;
    	Object.FileName = szFileName;

    	sts = EssOtlOpenOutline(hCtx, &Object, ESS_FALSE, ESS_TRUE, &hOutline);
    	if(sts)
    	{
    		printf("Could not open outline\n");
    		return sts;
    	}

    	sts = EssOtlGetEnabledDTSMembers(hOutline, &usCount, &pEnabledDTSMbrList);
    	if(sts)
    	{
    		printf("Could not get enabled DTS member alias\n");
    	}
    	else
    	{
    		printf("No of enabled DTS members is %u\n", usCount);
    		for (i = 0; i < usCount; i++)
    		{
    			printf("%s\n", pEnabledDTSMbrList[i]);
    		}
    	}
    	EssOtlCloseOutline(hOutline);
    	return sts;
    }

See Also

EssOtlDeleteDTSMemberAlias
EssOtlEnableDTSMember
EssOtlGetDTSMemberAlias
EssOtlSetDTSMemberAlias