EssPartitionApplyOtlChangeRecs

ターゲット・アウトラインへのアウトライン変更に適用されます。この関数は、EssPartitionGetOtlChangesを呼び出した後に、EssPartitionReadOtlChangeFileを使用して対話的に使用するように設計されています。EssPartitionReadOtlChangeFileによって戻される変更ファイルを編集して拒否フラグを設定できます。拒否フラグはESS_PARTOTL_SELECT_APPLY_Tから参照したESS_PARTOTL_MBR_RSRVD_API_Tで設定されます。

構文

            ESS_FUNC_M EssPartitionApplyOtlChangeRecs (
            hCtx, pApplyRecords
            );
         
パラメータデータ型説明

hCtx

ESS_HCTX_T

APIコンテキスト・ハンドル。

pApplyRecords

ESS_PARTOTL_SELECT_APPLY_T

適用するレコード。

備考

戻り値

正常終了の場合は0が戻され、失敗した場合はエラー・コードが戻されます。

アクセス

この関数を呼び出すには、データベース・デザイナのアクセス権限が必要です。

         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);
   
}
      

関連トピック