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.
Syntax
ESS_FUNC_M EssPartitionApplyOtlChangeRecs (hCtx, pApplyRecords);
| Parameter | Data Type | Description |
|---|---|---|
hCtx | ESS_HCTX_T | Handle to API context. |
pApplyRecords | ESS_PARTOTL_SELECT_APPLY_T | Records to apply. |
Notes
There may be dependencies among change records.
Rejecting a record may cause a failure when applying another record. For example, you have two records "add A" and "add AA as a child of A". Rejecting the first record and accepting the second causes an apply failure.
Return Value
Returns zero if successful; error code if unsuccessful.
Access
A call to this function requires database designer access privileges.
Example
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 = "C:\\Hyperion\\products\\Essbase\\EssbaseServer\\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);
}See Also