EssBeginIncrementalBuildDim

It starts the process to build members on the active database. Internally, Essbase server opens the outline of the active database and keeps it open and ready for the next steps of dimension build.

Syntax

ESS_FUNC_M EssBeginIncrementalBuildDim(hCtx);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

Essbase API context handle.

Return Value

Returns zero if successful; error code if unsuccessful.

Example

ESS_FUNC_M
ESS_IncBuildDim( ESS_HCTX_T hCtx)
{
   ESS_STS_T     sts = 0;
   ESS_OBJDEF_T  RulesObj;
   ESS_OBJDEF_T  DataObj;
   ESS_STR_T     ErrorName;
   ESS_APPNAME_T     appname;
	ESS_DBNAME_T      dbname;

   memset(&RulesObj,0,sizeof(ESS_OBJDEF_T));
   memset(&DataObj,0,sizeof(ESS_OBJDEF_T));
   strcpy(appname, "sample");
   strcpy(dbname,"basic");

   RulesObj.hCtx     = hCtx;
   RulesObj.FileName = "genref"; 
   RulesObj.AppName  = appname;
   RulesObj.DbName   = dbname;
   RulesObj.ObjType  = ESS_OBJTYPE_RULES;  
   
   DataObj.hCtx      = hCtx;
   DataObj.FileName  = "genref";
   DataObj.AppName   = appname;
   DataObj.DbName    = dbname;
   DataObj.ObjType   = ESS_OBJTYPE_TEXT;    
    
   ErrorName         = "builddim.err";
   
   sts = EssBeginIncrementalBuildDim(hCtx);

   if (!sts)
      sts = EssIncrementalBuildDim(hCtx,&RulesObj,&DataObj,NULL,ErrorName,true,ESS_INCDIMBUILD_BUILD,NULL);
   if (!sts)
      sts = EssIncrementalBuildDim(hCtx,&RulesObj,&DataOb,NULL,ErrorName,true,ESS_INCDIMBUILD_VERIFY,NULL);
   if (!sts)
      sts = EssIncrementalBuildDim(hCtx,&RulesObj,&DataOb,NULL,ErrorName,true,ESS_INCDIMBUILD_SAVEOTL,"tmpotl");


   sts = EssBeginStreamBuildDim(hCtx, &RulesObj,ESS_INCDIMBUILD_BUILD,"tmpotl");
   if (!sts)
      sts = EssSendString(hCtx, "600	600-20	600-20-20\n");
   if (!sts)
      sts = EssSendString(hCtx, "600	600-20	600-20-30\n");
   if (!sts)
      sts = EssSendString(hCtx, "600	600-40	600-40-20\n");
   sts = EssEndStreamBuildDim(hCtx,ErrorName,false);


   sts = EssEndIncrementalBuildDim(hCtx,ESS_DOR_ALLDATA,"tmpotl",ErrorName,false);
   return sts;
}

See Also