Log In
E-mail or User ID
Password
  Keep me signed in
Recover Password
Create an Account
Hyperion BI

Solve problems - It's Free

Create your account in seconds
Email address
Username

Between 5 and 30 characters. No spaces please
Password
Notify me of new activity in this group:
Keep me informed of the latest:
By clicking "Join Now", you agree to Toolbox for Technology terms of use, and have read and understand our privacy policy.

How do I setup sub variable with double quotes using batch file and MaxL script?

I have to setup a variable that should have value "Total Company" with double quotes so i'd be able to use it in the calculation script. I'm trying to do it via batch/MaxL script combination.

In MaxL script I have:
alter database $1.$2 set variable BusArea =$3;


How do I setup this $3 parameter in the batch file so it'd keep double quotes while transferring "Total Company" to Essbase? Or are there any other proven ways to do it?

Thanks!
7 Replies
0
Mark this reply as the best answer?
(Choose carefully, this can't be changed)
Yes  |  No
serqet replied Oct 19, 2010
I haven't been able to load quotations in a Sub Var value in MaxL (even though it can be done in a GUI). If no one comes through, you may have to load it as such:

alter database $1.$2 set variable BusArea "$3";

/* notice the change in the syntax, and the double quotes around the variable it will expand and the space will be preserved */

Then use the calc script function @name(BusArea) to pull it out in a calculation script.


Good Luck!
0
Mark this reply as the best answer?
(Choose carefully, this can't be changed)
Yes  |  No
serqet replied Oct 19, 2010
Updating for an error in the calc script function using a sub var:

@NAME(&BusArea)


Good Luck!
0
Mark this reply as the best answer?
(Choose carefully, this can't be changed)
Yes  |  No
Jerry Jackson replied Oct 19, 2010
Try passing the parameter as "'"value"'". That is quote-single quote-quote Value quote-single quote-quote.


I created a max script called var.msh to update a variable I created for the demo application.

Alter application 'demo' set variable 'test_var' $1;

And called the script like this:

msh var.msh "'"X"'";

This set the variable to the value "X".
0
Mark this reply as the best answer?
(Choose carefully, this can't be changed)
Yes  |  No
serqet replied Oct 20, 2010
Hi jjacks. What version of Essbase are you running your script against? When I run the same in version 7.1.3 (I know... ancient!!) my MaxL log confirms this:

MAXL> alter system set variable XTestVar "'Total'";

But the server shows Total with no quotes.

Like wise, when I use the same with the value "'"Total Company"'" , MaxL confirmed

MAXL> alter system set variable XTestVar "'Total";

And the server shows Total with no quotes.


OP: which version are you using as well?
0
Mark this reply as the best answer?
(Choose carefully, this can't be changed)
Yes  |  No
Jerry Jackson replied Oct 20, 2010
I'm using Essbase MaxL Shell - Release 9.3.1 (ESB9.3.1.2.6B001).
0
Mark this reply as the best answer?
(Choose carefully, this can't be changed)
Yes  |  No
Vishal replied Apr 17, 2012
Hi Shulman,

I am currently facing same situation.

I have to pass 9507 value to variable its dropping quotes.

alter database 'APP'.'DBS' set variable 'QLVMeasure' "'$4'";

were you able to resolve this. I am on 11.1.1.3.

Thanks in Advance.
0
Mark this reply as the best answer?
(Choose carefully, this can't be changed)
Yes  |  No
Vishal replied Apr 17, 2012
Thanks guys its working

Alter database 'APP'.'DBS' set variable 'QLVMeasure' "\"$4\"";
For discussions on Hyperion BI please visit the Oracle BI group. The Hyperion BI group is no longer active.

PCMag Digital Group AdChoices

TRUSTe Privacy Certification