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); 
ParameterData TypeDescription

hOutline

ESS_HOUTLINE_T

The Essbase outline handle returned from the EssOtlOpenOutline call.

pusCount

ESS_PUSHORT_T

The number of enabled DTS Members.

ppEnabledDTSMemberList

ESS_PPDTSMBRINFO_T

Pointer to an array of DTS member info structures (for the enabled DTS members for the outline).

Notes

This function also fills in theESS_DTSMBRNAME_T structure passed to it.

Return Value

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

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