# EssOtlGetDTSMemberAlias

Description

EssOtlGetDTSMemberAlias() gets an alias name for a Dynamic Time Series (DTS) member.

Syntax

    ESS_STS_T EssOtlGetDTSMemberAlias (hOutline, pszDTSMember, pszAliasTable, ppszAlias);

ESS_HOUTLINE_T | hOutline
ESS_STR_T | pszDTSMember
ESS_STR_T | pszAliasTable
ESS_PSTR_T | ppszAlias

Parameters

hOutline | The Essbase outline handle returned from the EssOtlOpenOutline() call.
pszDTSMember | Name of the DTS member which provides the alias.
pzsAliasTable | Name of the alias table which provides the alias. If NULL, the default alias table is used.
ppszAlias | Pointer to a pointer to a C string containing the alias name for the DTS member.

Return Value

If successful the return value is zero. Otherwise, one of the following is returned:

OTLAPI_ERR_DTSMBRNOTDEFINED
OTLAPI_BAD_ALIASTABLE

Example

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

    ESS_STS_T ESS_OtlGetDTSMemberAlias(ESS_HCTX_T hCtx)
    {
    	ESS_STS_T 		sts =ESS_STS_NOERR;
    	ESS_OBJDEF_T	Object;
    	ESS_HOUTLINE_T	hOutline;
    	ESS_APPNAME_T	szAppName;
    	ESS_DBNAME_T	szDbName;
    	ESS_OBJNAME_T	szFileName;
    	ESS_CHAR_T	pszAliasTable[ESS_ALIASNAMELEN];
    	ESS_STR_T	pszAlias;
    	ESS_CHAR_T	pszDTSMember[ESS_MBRNAMELEN];

    	strcpy(szAppName, "sample");
    	strcpy(szDbName, "Basic");
    	strcpy(szFileName, "Basic");
    	strcpy(pszDTSMember, "Q-T-D");
    	strcpy(pszAliasTable, "Default");

    	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 = EssOtlGetDTSMemberAlias(hOutline, pszDTSMember, pszAliasTable, &pszAlias);
    	if(sts)
    	{
    		printf("Could not get DTS member alias\n");
    		return sts;
    	}
    	printf("MEMBER %s is aliased to %s\n", pszDTSMember, pszAlias);
    	EssOtlCloseOutline(hOutline);
    	return sts;
    }

See Also

EssOtlDeleteDTSMemberAlias
EssOtlEnableDTSMember
EssOtlGetEnabledDTSMembers
EssOtlSetDTSMemberAlias