# EssBuildDimFile

Description

EssBuildDimFile() builds a data file used to add or remove members from the active database outline. See EssBuildDimension() for more information.

Syntax

    ESS_FUNC_M EssBuildDimFile (hCtx, RulesObj, DataObj, MbrUser,
    ErrorName, fOverwriteErrorFile);

ESS_HCTX_T | hCtx
ESS_POBJDEF_T | RulesObj
ESS_POBJDEF_T | DataObj
ESS_PMBRUSER_T | MbrUser
ESS_STR_T | ErrorName
ESS_BOOL_T | fOverwriteErrorFile

Parameters

hCtx | Essbase API context handle.
RulesObj | Pointer to rules file object definition structure.
DataObj | Pointer to data file object definition structure.
MbrUser | SQL user structure (if data source is SQL database). NULL structure indicates a non-SQL data source.
ErrorName | Error name output on client.
fOverwriteErrorFile | A Boolean value which detemines whether this function overwrites an existing file name ErrorFile.

Return Value

Returns a zero if successful.

Notes

- If MbrUser is not NULL, an SQL data source is assumed.
- The description of EssImport() provides information on importing data sources.
- The database must be the active database. See the description of EssSetActive().
- EssBuildDimStart() must be called prior to using EssBuildDimFile().
- EssBuildDimFile() can be called repeatly prior to restructuring to add members via multiple rules and/or data file to the outline.
- The database must be restructured after completion of call(s) to EssBuildDimFile().
- The outline must be unlocked after resturcturing.

Access

This function requires database design privilege ESS_PRIV_DBDESIGN for the specified database.

Example

    ESS_FUNC_M EssBuildDimFile (ESS_HCTX_T hCtx)
    {
       ESS_FUNC_M sts = ESS_STS_NOERR;
       ESS_OBJDEF_T RulesObj;
       ESS_OBJDEF_T DataObj;
       ESS_STR_T ErrorName;

       RulesObj.hCtx = hCtx;
       RulesObj.FileName = "Prodmap";
       RulesObj.ObjType = ESS_OBJTYPE_RULES;

       DataObj.hCtx = hCtx;
       DataObj.FileName = "Prodtabl";
       DataObj.ObjType = ESS_OBJTYPE_TEXT;
       ErrorName = "builddim.err";

       sts = EssBuildDimFile (hCtx, &RulesObj,
             &DataObj, NULL, ErrorName);
       return (sts);
    }

See Also

EssImport()
EssBuildDimension()
EssBuildDimStart()
EssOtlRestructure()
EssUnlockObject()