Skip to Content
author's profile photo Former Member
Former Member

two questions on script logic

Hi all,

I know I can use nested *WHEN statements such as

*WHEN ACCOUNT

*IS A

*WHEN CATEGORY

*IS XY

*REC

*ENDWHEN

*ENDWHEN

But should nested *WHEN statements such as this one work?

*WHEN ACCTDETAIL

*IS F_CLO

*WHEN SIGNEDDATA

*IS < 0

*WHEN ACCTDETAIL

*IS F_OPE

*WHEN SIGNEDDATA <0

*REC

*ENDWHEN

*ENDWHEN

*ENDWHEN

*ENDWHEN

And secondly, if I use *WHEN SIGNEDDATA with three cases:

*WHEN ACCTDETAIL

*IS F_CLO

*WHEN SIGNEDDATA

*IS < 0

*REC

*IS = 0

*REC

*IS > 0

*REC

*ENDWHEN

*ENDWHEN

would the case where there is no entry in the fact table for F_CLO (for example after an optimisation of because no data has been entered) be captured by the *IS = 0 or do I need an *ELSE?

Thanks,

Arnold

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jul 04, 2012 at 12:20 PM

    Hi Arnold,

    for the first question I don't think it will work, you must try, but you can rewrite the test in a more simple way

    *WHEN SIGNEDDATA

    *IS < 0

    *WHEN ACCTDETAIL

    *IS F_CLO

    ...

    *IS F_OPE

    ...

    *ENDWHEN

    *ENDWHEN

    for the second there are nested *WHEN, that means that the Signeddata tests are inside the Accdteail test so you need and *ELSE.

    Kind regards

    Roberto

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 05, 2012 at 06:44 AM

    Hi Arnold,

    For the first case, the script is trying to check if a record has two members within a dimension-ACCTDETAIL. This is not possible. However you can try using

    • *WHEN GET(ACCTDETAIL="F_CLO")
    • *IS 0.....

    For the second case, you must use *ELSE to proceed further, since there are no records to compare with signeddata.

    Karthik AJ

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.