Reads changes from a file into memory.
ESS_FUNC_M EssPartitionReadOtlChangeFile (hCtx, pSelectMetaRecords, pMetaChangeRead);
ESS_HCTX_T | hCtx; |
ESS_PSELECT_CHANGE_T | pSelectMetaRecords; |
ESS_PREAD_T | pMetaChangeRead; |
hCtx | Essbase API context handle. |
pSelectMetaRecords | Criteria to select records to read. |
pMetaChangeRead | Pointer to meta change records read from the file. |
Returns zero if successful; error code if unsuccessful.
This routine returns a time in pMetaChangeRead. It's the same time stamp you should pass to EssXXApplyRecords() to update the timestamp at target database. It's also the same time stamp you should use for EssStampPurge() to purge applied records.
A call to this function requires database designer access privileges.
ESS_STS_T ESS_PartitionReadOtlChangeFile(ESS_HCTX_T hCtx, ESS_HINST_T hInst) { ESS_STS_T sts; ESS_STR_T chgfilename; ESS_TIME_T time; 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(&OtlChg, 0, sizeof(ESS_PARTOTL_CHANGE_API_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"; time = 0; uldimfilter = ESS_DIMCHG_ALL; ulmbrfilter = ESS_PARTITION_OTLMBR_ALL; ulmbrattrfilter = ESS_PARTITION_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("EssPartitionReadOtlChangeFile sts: %ld\n",sts); sts = EssPartitionFreeOtlChanges(hCtx); printf("\tEssPartitionFreeOtlChanges sts: %ld\n",sts); return(sts); }
Constant and Structure Definitions for
Partitions
EssPartitionApplyOtlChangeFile()
EssPartitionApplyOtlChangeRecs()
EssPartitionCloseDefFile()
EssPartitionFreeDefCtx()
EssPartitionFreeOtlChanges()
EssPartitionGetAreaCellCount()
EssPartitionGetList()
EssPartitionGetOtlChanges()
EssPartitionGetReplCells()
EssPartitionNewDefFile()
EssPartitionOpenDefFile()
EssPartitionPurgeOtlChangeFile()
EssPartitionPutReplCells()
EssPartitionReadDefFile()
EssPartitionReplaceDefFile()
EssPartitionResetOtlChangeTime()
EssPartitionValidateDefinition()
EssPartitionWriteDefFile()