on 2012 Mar 21 6:15 PM
Hi all,
I'm facing a strange behavior on my script logic.
Like the code below shows, I intend to calculate a value multiplying a measure by another.
*WHEN INDIC
*IS IND0006
*BEGIN
*REC(INDIC="IND0048",EXPRESSION=%VALUE% * ( [INDIC].[IND0004],[TIME].[%TIME_SET%] ) )
*END
*ENDWHEN
*COMMIT
As the indicator IND0004 has value just in January, I'm using a dynamic variable to get total of the year (2012.TOTAL for example).
This way the admin is triggering the folowing message: "LINE 0 syntax error: "missing ) in parenthetical"
Then I replaced the %TIME_SET% by a hard code value, as below:
*WHEN INDIC
*IS IND0006
*BEGIN
*REC(INDIC="IND0048",EXPRESSION=%VALUE% * ( [INDIC].[IND0004],[TIME].[2012.TOTAL] ) )
*END
*ENDWHEN
*COMMIT
And the error does not recur.
A strange thing too, is that in UJKT the code is validated in both ways.
Any help is welcome.
Thank you in advance.
Regards
Lucas Costa
Request clarification before answering.
Hi Lucas,
In UJKT Validation doesn't substitute %DIM_SET% variables, try simulation.
Regards,
Gersh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gersh,
Thanks for your reply.
But in UJKT there is a place (an area above of the area where the script is put) that replace the %DIM_SET%, so that when you do not put the value of DIM_SET in that area, there is a syntax error.
As I use just the %TIME_SET%, I placed TIME=2012.TOTAL, and works fine.
Further, I have tried simulation, through a package but is showing the same error that is showed in admin. In UJKT, through the EXECUTE button is working fine the same code.
I think that the central problem is why the admin is triggering an error when I use the %DIM_SET% variable, further, this error of parentheses.
Thanks in Advance.
Regards
Lucas
Hi Gersh,
2012.TOTAL is node. And I'm not trying to add data to the node. Please note that my *XDIM_MEMBERSET is defined as BAS(%TIME_SET%), in other words just processing the months, that is the bas members.
In the following line:
*REC(INDIC="IND0048",EXPRESSION=%VALUE% * ( [INDIC].[IND0004],[TIME].[%TIME_SET%] ) )
I used %TIME_SET% to bring all values of a year.
Regards
Lucas
Thansk Roberto,
Now is saving without error, but when I execute, is producing 0. It's not doing the right selection.
This script is modularized, so I took off the *COMMIT statement, and put it into the main *INCLUDE, and is working fine. The error still there, but it's working.
Thanks all for your help.
Regards,
Lucas Costa
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.