Want to know The Truth About CPM?

09 October 2010

Stupid programmng tricks #3


Number three in my series of short tricks and tips.

This is a case of misleading documentation.  Or a stupid programming trick.  You decide.

The Most eXcellent Awesome Language (MaxL) maybe isn’t

display variable all ; will display all variables on your Essbase server.

display variable on database Sample.Basic ; will display all of the variables in My Very Favorite Essbase Database In The Whole Wide World (MVFEDITWWW).

But what if you have a variable called Test defined in MVFEDITWWW? 

Here's the syntax from the Tech Ref:

You might think that these commands would work:

display variable test on database sample.basic;

display variable 'test' on database sample.basic;

They don't and will kick out an error near 'on'. 

The actual syntax is:

display variable sample.basic.test ; 

Do so and you will get back:

 application    database    variable    value


 Sample            Basic        Test        "Jan"


You could also type display variable othertest ; and get back the results if the variable was at the server level. I think otherwise you have to start using the appname.dbname.varname nomenclature.  I believe (and I haven't tested this, but it seems reasonable -- hey, this gives you something to do if in case you are casting about for something to play around with) display variable appname.varname ; also works.


I’ve named these short posts “Stupid programming tricks”.  Surely this post fits the description.  Until you can’t figure it out.

Happy MaxL hacking till next time.

No comments: