EssEndIncrementalBuildDim

Finalizes the round of building dimensions: Performs outline verification, if there is no outline verification error, it writes and closes the outline and do restructure. If the outline has errors, it writes the outline to the outline file specified by “szTmpOtlFile” and close the outline. User can use outline editing tools, such as EAS outline editor to see what is wrong in the outline.

Syntax

ESS_FUNC_M EssEndIncrementalBuildDim (hCtx, restructOption, szTmpOtlFile, ErrorName, bOverwrite)
ParameterData TypeDescription

hCtx

ESS_HCTX_T

Essbase API context handle.

restructOption

ESS_SHORT_T

Restructure option. Valid value:

  • ESS_DOR_ALLDATA

    Keep all data

  • ESS_DOR_NODATA

    Discard all data

  • ESS_DOR_LOWDATA

    Keep all level 0 data

  • ESS_DOR_INDATA

    Keep all input data

szTmpOtlFile

ESS_STR_T

The temp outline file name.

ErrorName

ESS_STR_T

Name of error output file on client.

bOverwrite

ESS_BOOL_T

Indicates overwrite or append error message to the error file.

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