# EssPartitionOpenDefFile

Description

EssPartitionOpenDefFile() opens an existing shared-partition definition file.

Syntax

    ESS_FUNC_M EssPartitionOpenDefFile (hCtx, pszFileName, piFileHandle, ppDdbCtx);

ESS_HCTX_T | hCtx
ESS_STR_T | pszFileName
ESS_PINT_T | piFileHandle
ESS_PPPART_T | ppDdbCtx

Parameters

hCtx | Essbase API context handle.
pszFileName | Name of file to be opened (complete path).
piFileHandle | Handle to created file.
ppDdbCtx | An initialized distributed context.

Return Value

Returns zero if successful; error code if unsuccessful.

Example

    ESS_FUNC_M ESS_PartitionOpenDefFile(ESS_HCTX_T hCtx)
    {
       ESS_FUNC_M        sts = 0;
       ESS_INT_T        iFileHandle;
       ESS_STR_T        pszFileName;
       ESS_PART_T       DdbCtx, *pDdbCtx;
       pszFileName = "d:\\essbase5\\app\\app1\\trg1\\trg1.ddb";
       sts = EssPartitionOpenDefFile(hCtx,pszFileName,&iFileHandle,&pDdbCtx);
       printf("EssPartitionOpenDefFile  sts: %ld\n",sts);

       if (!sts)
       {
    	   sts = EssPartitionReadDefFile(hCtx,iFileHandle,&DdbCtx);
    	   printf("\tEssPartitionReadDefFile  sts: %ld\n",sts);

           /* ...
              ...  process definition file information
        	  ...
           */
    	   sts = EssPartitionCloseDefFile(hCtx,iFileHandle);

           printf("\tEssPartitionCloseDefFile   sts: %ld\n",sts);

    	   sts = EssPartitionFreeDefCtx(hCtx,pDdbCtx);

           printf("\tEssPartitionFreeDefCtx   sts: %ld\n",sts);

       }
       return (sts);
    }

See Also

Constant and Structure Definitions for Partitions
EssPartitionApplyOtlChangeFile()
EssPartitionApplyOtlChangeRecs()
EssPartitionCloseDefFile()
EssPartitionFreeDefCtx()
EssPartitionFreeOtlChanges()
EssPartitionGetAreaCellCount()
EssPartitionGetList()
EssPartitionGetOtlChanges()
EssPartitionGetReplCells()
EssPartitionNewDefFile()
EssPartitionPurgeOtlChangeFile()
EssPartitionPutReplCells()
EssPartitionReadDefFile()
EssPartitionReadOtlChangeFile()
EssPartitionReplaceDefFile()
EssPartitionResetOtlChangeTime()
EssPartitionValidateDefinition()
EssPartitionValidateLocal()
EssPartitionWriteDefFile()