4 Replies Latest reply on Jul 30, 2013 5:03 PM by Anthony Dodds

    Error Validating Business Rule in Calculation Manager (@_AT) ?

    user12133311

      I have migrated an 11.1.1.3 business rule and two macros (templates) into Calculation Manager 11.1.2.2. When I validate the script I get the following error. Has anybody seen this before or have any guidance? The script syntax checks ok.

       

      "An error occurred in: Rule:FCO_3YrBud_DGAlloc Error:Error parsing formula for [FIX STATEMENT] (line 24): Expected [(] found [@_AT] after function name Rule FCO_3YrBud_DGAlloc "

       

      Line 24 is the first FIX statement in the script show below:

       

       

       

       

      SET UPDATECALC OFF; SET AGGMISSG OFF;

      %Template(name:="FCOm_TargetSection",application:="FCO",plantype:="FCO",dtps:=("parm1":=([["Three Year Budget"]]),"parm2":=([["DGAllocation"]]),"parm3":=([[{FCOrtpYears}]]),"parm4":=([[Mar]])))

      %Template(name:="FCOm_TargetAgg",application:="FCO",plantype:="FCO",dtps:=("parm1":=([["Three Year Budget"]]),"parm2":=([["DGAllocation"]]),"parm3":=([[{FCOrtpYears}]]),"parm4":=([[Mar]])))

       

      First template:

       

      SET UPDATECALC OFF; SET AGGMISSG OFF;

      /****************************************************************************************************************

      FCOm_TargetSection

      parm1 = scenario

      parm2 = version

      parm3 = years

      parm4 = periods

       

      The purpose of this macro is to translate Target input to GBP and copy to Curr NA and aggreggated. Step1: Copy inputs to Total Section to I/P Total Section and No Project Step1: Copy inputs to Converted Currency - no need to translate as all inputs are in GBP Step2: Copy Input GBP values to Curr NA

       

      *****************************************************************************************************************/

      FIX(([["Three Year Budget"]]),([["DGAllocation"]]),([["FY15"]]),([[Mar]]),@IDESCENDANTS("BH - T"), "Curr NA", "Baseline","Entered Currency","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

       

      DATACOPY "Total Section" TO "Input_Total Section";

      DATACOPY "Total Section" TO "No Project";

       

      ENDFIX

       

      FIX(([["Three Year Budget"]]),([["DGAllocation"]]),([["FY15"]]),([[Mar]]),@IDESCENDANTS("BH - T"), "Curr NA","Total Section", "Input_Total Section", "No Project","Baseline","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

       

      DATACOPY "Entered Currency" TO "Converted Currency (GBP)";

       

      ENDFIX

       

      FIX(([["Three Year Budget"]]),([["DGAllocation"]]),([["FY15"]]),([[Mar]]),@IDESCENDANTS("BH - T"), "Total Section","Input_Total Section","No Project", "Baseline", "Entered Currency","Converted Currency (GBP)","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

       

      DATACOPY "Curr NA" TO "Input GBP";

       

      ENDFIX

       

      Second template:

       

      /****************************************************************************************************************

      FCOm_TargetAgg

       

      parm1 = scenario

      parm2 = version

      parm3 = years

      parm4 = periods

       

      The purpose of this macro is to  aggreggate Target data Step2: Aggregate data

       

      *****************************************************************************************************************/

       

      FIX(([["Three Year Budget"]]),([["DGAllocation"]]),([["FY15"]]),([[Mar]]),"Baseline","Entered Currency","Converted Currency (GBP)")

       

      CALC DIM("Account","BudgetHolder","Input Currency","SectionProjects");

       

      ENDFIX

        • 1. Re: Error Validating Business Rule in Calculation Manager (@_AT) ?
          Anthony Dodds

          Hi There

           

          Your syntax is all wrong

           

          Your rule looks okay with both the templates listed with the DTPs all listed with their values, but its the syntax in your templates. In the FIX statements, where you should have the [Parm1], [Parm2] etc etc, you have put the Parm values, so ([["Three Year Budget"]]). That is wrong. In the templates themselves you should have [Parm1], not the value for Parm1. Also Parm stands for parameters, which in new speak is Design Time Prompts. If you look back at the macros in the 11.1.1.3 environment you will see that these macros have Parm1, Parm2 etc in the FIX statements, not the "Three Year Budget" member names.

           

          Just so that you know, the syntax check in the template does still validate (not good I know).

           

          I have posted the corrected code for one of your templates

           

          See your first template. So the Template called "FCOm_TargetSection" should have one script with the code below inserted.

           

           

          Thanks

           

          Anthony Dodds

           

           

          First template:

           

          SET UPDATECALC OFF; SET AGGMISSG OFF;

          /****************************************************************************************************************

          FCOm_TargetSection

          parm1 = scenario

          parm2 = version

          parm3 = years

          parm4 = periods

           

          The purpose of this macro is to translate Target input to GBP and copy to Curr NA and aggregated. Step1: Copy inputs to Total Section to I/P Total Section and No Project Step1: Copy inputs to Converted Currency - no need to translate as all inputs are in GBP Step2: Copy Input GBP values to Curr NA

           

          *****************************************************************************************************************/

          FIX([Parm1],[Parm2],[Parm3],[Parm4],@IDESCENDANTS("BH - T"), "Curr NA", "Baseline","Entered Currency","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

           

          DATACOPY "Total Section" TO "Input_Total Section";

          DATACOPY "Total Section" TO "No Project";

           

          ENDFIX

           

          FIX([Parm1],[Parm2],[Parm3],[Parm4],@IDESCENDANTS("BH - T"), "Curr NA","Total Section", "Input_Total Section", "No Project","Baseline","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

           

          DATACOPY "Entered Currency" TO "Converted Currency (GBP)";

           

          ENDFIX

           

          FIX([Parm1],[Parm2],[Parm3],[Parm4],@IDESCENDANTS("BH - T"), "Total Section","Input_Total Section","No Project", "Baseline", "Entered Currency","Converted Currency (GBP)","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

           

          DATACOPY "Curr NA" TO "Input GBP";

           

          ENDFIX

          1 person found this helpful
          • 2. Re: Error Validating Business Rule in Calculation Manager (@_AT) ?
            Anthony Dodds

            Actually

             

            I have just been re thinking about your post. My comments above may not be correct for your situation. The Syntax above is correct if you are talking about the code "within" the template itself (So if you open the template and look at the code). But if the code you posted in your messages was from the script window of the rule (When in script mode) then your problem is something different potentially.

             

            So the first thing is to make sure that in the template itself (template open) the DTPs are defined in the global range or member range as [Parm1],[Parm2] etc (Or fix, depending on how the template is shown) as I said in my first response above, the template only defines the DTP, not the members and should be enclosed in square brackets, like [Parm1}. That will make sure the DTP as defined in your template correctly. Then we need to look at how you are defining those DTPs in the rule itself. Normally this is a lot easier if your rule is in graphical view, as you just click on the template and your can enter the values. As you have your rule in Script mode you need to be very careful in how you define the DTP values. Each DTP 'type' has different syntax in script mode.

             

            On looking at your script again I can see another problem potentially. When defining the values in the DTP's, the value needs enclosing with double square brackets, like so  [["Three Year Budget"]]. In your script you also have parenthesis. Which isn't always correct. There are times having parenthesis and double brackets is correct, but that is only when your DTP is type "Members", and by default I think old business rule macros will be translated into templates with the DTP types of "Script"

             

            So if you also amend your business section where the templates are defined to as below; (as you can see, no parenthesis around the DTP values).

             

            SET UPDATECALC OFF; SET AGGMISSG OFF;

            %Template(name:="FCOm_TargetSection",application:="FCO",plantype:="FCO",dtps:=("parm1":=[["Three Year Budget"]],"parm2":=[["DGAllocation"]],"parm3":=[[{FCOrtpYears}]],"parm4":=[[Mar]]))

            %Template(name:="FCOm_TargetAgg",application:="FCO",plantype:="FCO",dtps:=("parm1":=[["Three Year Budget"]],"parm2":=[["DGAllocation"]],"parm3":=[[{FCOrtpYears}]],"parm4":=[[Mar]]))

             

            The end game should be that when you open your rule and view in script mode and then select script tab down the bottom your templates should look as below, as you will see, all that should be shown in the script are the values substituted from the template definition, key point is that there are no brackets or Parenthesis. The script should show "pure" script. ( I have highlighted and underlined how those 4 DTPs should translate in the script view)

             

            First template:

             

            SET UPDATECALC OFF; SET AGGMISSG OFF;

            /****************************************************************************************************************

            FCOm_TargetSection

            parm1 = scenario

            parm2 = version

            parm3 = years

            parm4 = periods

             

            The purpose of this macro is to translate Target input to GBP and copy to Curr NA and aggregated. Step1: Copy inputs to Total Section to I/P Total Section and No Project Step1: Copy inputs to Converted Currency - no need to translate as all inputs are in GBP Step2: Copy Input GBP values to Curr NA

             

            *****************************************************************************************************************/

            FIX("Three Year Budget","DGAlocation",FY15,Mar,@IDESCENDANTS("BH - T"), "Curr NA", "Baseline","Entered Currency","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

             

            DATACOPY "Total Section" TO "Input_Total Section";

            DATACOPY "Total Section" TO "No Project";

             

            ENDFIX

             

            FIX("Three Year Budget","DGAlocation",FY15,Mar,@IDESCENDANTS("BH - T"), "Curr NA","Total Section", "Input_Total Section", "No Project","Baseline","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

             

            DATACOPY "Entered Currency" TO "Converted Currency (GBP)";

             

            ENDFIX

             

            FIX("Three Year Budget","DGAlocation",FY15,Mar,@IDESCENDANTS("BH - T"), "Total Section","Input_Total Section","No Project", "Baseline", "Entered Currency","Converted Currency (GBP)","A - 6111","A - 6112","A - 6113","A - 65","A - 66","A - 620905")

             

            DATACOPY "Curr NA" TO "Input GBP";

             

            ENDFIX

             

             

            Thanks

             

            Anthony

            • 3. Re: Error Validating Business Rule in Calculation Manager (@_AT) ?
              user12133311

              Anthony

               

              Firstly, many thanks for taking the time to provide such a comprehensive explanation - You are spot on!!!!. The validation works - and thats a first for us!

               

              We did not alter the code at all -  What you saw was what the migration process deduced from the original 11.1.1.3 business rule . And were right, the DTPs were by default defined as type String.

               

              I have a chance now at least of migrating the other 80 odd rules! Although as I understand it, any nested macros/templates I will have to recreate in Calc. Manager myself.

               

              BTW - Where on earth does the @_AT come from? This has thrown Oracle support.

              • 4. Re: Error Validating Business Rule in Calculation Manager (@_AT) ?
                Anthony Dodds

                No problem

                 

                Its interesting that it did that on import by default, it doesn't do that for me. But that could be because you are on Unix. Sometimes that can give you some funnies.

                 

                The right pain is actually the fact you now have to define DTP text on importing the old business rules. That's a right pain in the ****, you never had to do that previously with older versions of Calc Manager.

                 

                You are correct on your point about templates in templates. You actually cannot do that in Calc Manager, as you cannot pass DTP into a template from a template. So those rules will need re-defining by potentially just dropping the base templates into the rule and not have the middle layer template.

                 

                I suspect the @_AT is the Essbase version of "Computer says No!"

                 

                FYI - I have a detailed understanding of the application you are working on as I originally built it (That's why I know you are on Unix )

                 

                Thanks

                 

                Anthony

                1 person found this helpful