1 Reply Latest reply: Feb 22, 2014 2:53 AM by Phulsebosch RSS

Multidimensional operator in left side of the equation

Urbano83 Newbie
Currently Being Moderated

I'm into debugging old code and optimizing an application.

Some of the calculations found have a multidimensional operator in the left side of the equation and usually these are out of the FIX.

I've simplified the code just to make the point.

 

FIX("Commision_Account")

IF ((&Year1->"Version01"->"Activation_Account"->"USD"==1)

          Jan(

   "Version03"->"USD_Reports"= "Version01"->  "USD_Reports";

   "Version04"->"USD_Reports"= "Version01"->  "USD_Reports";

    . (Similar combinations follow)

    .

    .

)

ENDIF

ENDFIX

 

Remind me, what should be the technical explanation why is this not database efficient?

I'm thinking about changing the 'versions' to several FIX.

 

What would you do?

Thanks!

  • 1. Re: Multidimensional operator in left side of the equation
    Phulsebosch Pro
    Currently Being Moderated

    Hello Urbano,

    you could do the

    DATACOPY "Version01" TO "Version03";
    DATACOPY "Version01" TO "Version04";

    and adding the "USD_Reports" into the FIX.


    The main point however is that the DATACOPY is not allowed in the IF statement. You only want to do this, when the condition of the IF statement is met.


    Then the only way is to work with the equation. The blocks must exist, otherwise you need to add the SET CREATEBLOCKONEQ.

    The USD Reports can be added to the FIX anyway - given the example.


    Regards,

    Philip Hulsebosch

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points