# EssVerifyRulesFile

Description

EssVerifyRulesFile() verifies the syntax of the specified rules file.

Syntax

    ESS_FUNC_M  EssVerifyRulesFile (hCtx, ruleFileName, pNmColumns, ppColumnErrors);

ESS_HCTX_T | hCtx
ESS_STR_T | ruleFileName
ESS_PULONG_T | pNmColumns
ESS_ULONG_T | ppColumnErrors

Parameters

hCtx | Essbase API context handle.
ruleFileName | The name of the rules file to verify.
pNmColumns | Pointer to the number of columns in the rules file.
ppColumnErrors | Reference to the array of errors found.

Return Value

None.

Notes

- This function does not require that a specific database be active, that is, no EssSetActive() is required.
- This function is intended to be used after the rules file has been put on the server.

Access

This function requires no special privileges.

Example

    {
       ESS_STS_T      sts = ESS_STS_NOERR;
       ESS_ULONG_T    numColumns = 0, i;
       ESS_PULONG_T   pColumnErrors = NULL;

       sts = EssVerifyRulesFile(hCtx, "Test_Rule_File", &numColumns, &pColumnErrors);

       if(!sts){
          if(numColumns && pColumnErrors) {
             fprintf (cmdctxp->output, "nmColumns: %d\n", numColumns);
             for(i=0; i<numColumns; i++){
                fprintf (cmdctxp->output, "   Column[%d]:\n", i+1);
                if( pColumnErrors[i] == 0 )
                   fprintf (cmdctxp->output, "     No error\n");
                else{
                   if( pColumnErrors[i] & DAT_VERIFY_INVALIDMBR )
                      fprintf (cmdctxp->output, "     DAT_VERIFY_INVALIDMBR\n");
                   if( pColumnErrors[i] & DAT_VERIFY_SAMENAME )
                      fprintf (cmdctxp->output, "     DAT_VERIFY_SAMENAME\n");
                   if( pColumnErrors[i] & DAT_VERIFY_DIMUSED )
                      fprintf (cmdctxp->output, "     DAT_VERIFY_DIMUSED\n");
                   if( pColumnErrors[i] & DAT_VERIFY_MBRUSED )
                      fprintf (cmdctxp->output, "     DAT_VERIFY_MBRUSED\n");
                   if( pColumnErrors[i] & DAT_VERIFY_DIMINCROSSDIM )
                      fprintf (cmdctxp->output, "     DAT_VERIFY_DIMINCROSSDIM\n");
                   if( pColumnErrors[i] & DAT_VERIFY_DATAFIELD )
                      fprintf (cmdctxp->output, "     DAT_VERIFY_DATAFIELD\n");
                   if( pColumnErrors[i] & DAT_VERIFY_SIGNFLIPDIM )
                      fprintf (cmdctxp->output, "     DAT_VERIFY_SIGNFLIPDIM\n");
                   if( pColumnErrors[i] & DAT_VERIFY_DUPINHEADER )
                      fprintf (cmdctxp->output, "     DAT_VERIFY_DUPINHEADER\n");
                }
             }
             EssFree(cmdctxp->hInst, pColumnErrors);
          }
       }
    }

See Also

- EssVerifyFormula
- EssOtlVerifyFormula
- EssOtlVerifyOutlineEx