EssPartitionApplyOtlChangeRecs() applies outline changes to a target outline. This function is designed to be used interactively with EssPartitionReadOtlChangeFile() after a call to EssPartitionGetOtlChanges(). The change file returned by EssPartitionReadOtlChangeFile() can be edited to set the reject flags. The reject flags are set in ESS_PARTOTL_MBR_RSRVD_API_T, which is referenced from ESS_PARTOTL_SELECT_APPLY_T.
ESS_FUNC_M EssPartitionApplyOtlChangeRecs (hCtx, pApplyRecords);
| ESS_HCTX_T | hCtx |
| ESS_PPARTOTL_SELECT_APPLY_T | pApplyRecords |
| hCtx | Handle to Essbase API context. |
| pApplyRecords | Records to apply. |
Returns zero if successful; error code if unsuccessful.
A call to this function requires database designer access privileges.
ESS_FUNC_M Ess_PartitionApplyOtlChangeRecs (ESS_HCTX_T hCtx)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_PARTOTL_SELECT_APPLY_T ApplyRecords;
ESS_STR_T chgfilename;
ESS_TIME_T time = 0;
ESS_PARTOTL_CHANGE_API_T OtlChg;
ESS_ULONG_T uldimfilter=0,ulmbrfilter=0,ulmbrattrfilter=0;
ESS_PARTOTL_SELECT_CHG_T SelectMetaRecords;
ESS_PARTOTL_READ_T MetaChangeRead;
memset(&ApplyRecords, 0, sizeof(ESS_PARTOTL_SELECT_APPLY_T));
memset(&SelectMetaRecords, 0, sizeof(ESS_PARTOTL_SELECT_CHG_T));
memset(&MetaChangeRead, 0, sizeof(ESS_PARTOTL_READ_T));
chgfilename = "d:\\essbase5\\app\\app1\\trg1\\ess00001.chg";
uldimfilter = ESS_DIMCHG_ALL;
ulmbrfilter = ESS_PARTITION_OTLMBR_ALL;
ulmbrattrfilter = ESS_PARTITION_OTLPARTITION_OTLMBRATTR_ALL;
SelectMetaRecords.pszFileName = chgfilename;
SelectMetaRecords.QueryFilter.TimeStamp = time;
SelectMetaRecords.QueryFilter.ulDimFilter = uldimfilter;
SelectMetaRecords.QueryFilter.ulMbrFilter = ulmbrfilter;
SelectMetaRecords.QueryFilter.ulMbrAttrFilter = ulmbrattrfilter;
MetaChangeRead.pOtlChg = &OtlChg;
sts = EssPartitionReadOtlChangeFile (hCtx, &SelectMetaRecords, &MetaChangeRead);
printf("\tEssPartitionReadOtlChangeFile sts: %ld\n",sts);
if (!sts)
{
ApplyRecords.pszFileName = chgfilename;
ApplyRecords.pOtlChg = MetaChangeRead.pOtlChg;
ApplyRecords.SourceTime = MetaChangeRead.SourceTime;
sts = EssPartitionApplyOtlChangeRecs(hCtx, &ApplyRecords);
printf("EssPartitionApplyOtlChangeRecs sts: %ld\n",sts);
}
sts = EssPartitionFreeOtlChanges(hCtx);
return(sts);
}
Constant and Structure Definitions for
Partitions
EssPartitionApplyOtlChangeFile()
EssPartitionCloseDefFile()
EssPartitionFreeDefCtx()
EssPartitionFreeOtlChanges()
EssPartitionGetAreaCellCount()
EssPartitionGetList()
EssPartitionGetOtlChanges()
EssPartitionGetReplCells()
EssPartitionNewDefFile()
EssPartitionOpenDefFile()
EssPartitionPurgeOtlChangeFile()
EssPartitionPutReplCells()
EssPartitionReadDefFile()
EssPartitionReadOtlChangeFile()
EssPartitionReplaceDefFile()
EssPartitionResetOtlChangeTime()
EssPartitionValidateDefinition()
EssPartitionWriteDefFile()