EssPartitionApplyOtlChangeFile

Description

Requests server to apply a list of outline change files.

Syntax

ESS_FUNC_M EssPartitionApplyOtlChangeFile (hCtx, usFileName, ppszFileName);

ESS_HCTX_T hCtx;
ESS_USHORT_T usFileName;
ESS_PSTR_T ppszFileName;

Parameters

hCtx Handle to Essbase API context
usFileName Number of outline change files
ppFileName Array of file names; array size is defined by usFileName

Return Value

Returns zero if successful; error code if unsuccessful.

Notes

EssPartitionGetOltChanges() returns the file name.

Access

A call to this function requires database designer access privileges.

Example

ESS_STS_T ESS_PartitionApplyOtlChangeFile (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
   ESS_STS_T          sts;
   ESS_STR_T          hostname, appname, dbname;
   ESS_USHORT_T       usType;
   ESS_ULONG_T        uldimfilter=0,ulmbrfilter=0,ulmbrattrfilter=0;
   ESS_PARTOTL_QUERY_T    MetaQuery;
   ESS_PARTOTL_CHG_FILE_T MetaChangeFile;
   ESS_PPART_INFO_T   partitionp   = NULL;
   
   memset(&MetaQuery, 0, sizeof(ESS_PARTOTL_QUERY_T));
   
   hostname = "local";
   appname = "app1";
   dbname = "src1";

   usType = ESS_PARTITION_OP_LINKED;

   uldimfilter     = ESS_DIMCHG_ALL;
   ulmbrfilter     = ESS_PARTITION_OTLMBR_ALL;
   ulmbrattrfilter = ESS_PARTITION_OTLPARTITION_OTLMBRATTR_ALL;

   MetaQuery.HostDatabase.pszHostName   = hostname;
   MetaQuery.HostDatabase.pszAppName    = appname;
   MetaQuery.HostDatabase.pszDbName     = dbname;
   MetaQuery.usOperationType            = usType;
   MetaQuery.MetaFilter.TimeStamp       = 0;
   MetaQuery.MetaFilter.ulDimFilter     = uldimfilter;
   MetaQuery.MetaFilter.ulMbrFilter     = ulmbrfilter;
   MetaQuery.MetaFilter.ulMbrAttrFilter = ulmbrattrfilter;
   
   sts = EssPartitionGetOtlChanges(hCtx, &MetaQuery, &MetaChangeFile);
   
   
   if (!sts)
   {
		
	sts = EssPartitionApplyOtlChangeFile
	(hCtx, MetaChangeFile.usFileNum, MetaChangeFile.ppszFileName);
		
	printf("EssPartitionApplyOtlChangeFile  sts: %ld\n",sts);
		
   }

   if(&MetaChangeFile)  EssFree(hInst,&MetaChangeFile);


   return(sts);
   
}

See Also

Constant and Structure Definitions for Partitions
EssPartitionApplyOtlChangeRecs()
EssPartitionCloseDefFile()
EssPartitionFreeDefCtx()
EssPartitionFreeOtlChanges()
EssPartitionGetAreaCellCount()
EssPartitionGetList()
EssPartitionGetOtlChanges()
EssPartitionGetReplCells()
EssPartitionNewDefFile()
EssPartitionOpenDefFile()
EssPartitionPurgeOtlChangeFile()
EssPartitionPutReplCells()
EssPartitionReadDefFile()
EssPartitionReadOtlChangeFile()
EssPartitionReplaceDefFile()
EssPartitionResetOtlChangeTime()
EssPartitionValidateDefinition()
EssPartitionWriteDefFile()