EssPartitionGetOtlChanges

Description

Pulls outline changes from a given source and stores them in a file.

Syntax

ESS_FUNC_M EssPartitionGetOtlChanges (hCtx, pQuery, pChangeFile);

ESS_HCTX_T hCtx;
ESS_PARTOTL_QUERY_T pQuery;
ESS_PARTOTL_CHG_FILE_T pChangeFile;

Parameters

Caller allocated change files info struct.
hCtx Essbase API context handle.
pQuery Change query criteria.
pChangeFile

Return Value

Returns zero if successful; error code if unsuccessful.

Notes

Access

A call to this function requires database designer access privileges.

Example

ESS_STS_T  ESS_PartitionGetOtlChanges(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);

   printf("EssPartitionGetOtlChanges   sts: %ld\n",sts);

   if (!sts) {
   printf("\tNumber of meta change file found: %d\n",MetaChangeFile.usFileNum);
   printf("\tName of meta change file found: %s\n",MetaChangeFile.ppszFileName[0]);	 }

   if(&MetaChangeFile)  EssFree(hInst,&MetaChangeFile);
   
   return(sts);
}

See Also

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