Substitution variable IN MAXL

hi,
following maxl script is for ASO
alter database APP.DB clear data in region '{CrossJoin({StrTOMbr(&CURMONTH)},{EOP,ABC})}'physical;
above script working if CURMONTH="jan"
but , If CURMONTH= "jan","feb" "mar" then its giving error.
any advice

Thanks Glenn,
I am using STRTOMBR because i am giving values in double quotes("jan")
But,
CURMO is Substitution Variable which i am using it in Report Scripts as well. If i give values as [jan],[feb],[mar], then it works fine for MDX but it wont work for Report scripts.
I have one option to maintain Sub.Variable for MDX separately..but is their any other way to do this

Similar Messages

  • Can we use Substitution variables in MAXL?

    Hi,
    Can we use substitution variables in MAXL script?
    I have to run this MAXL command for clearing a slice of ASO cube on V11.1.1.3.
    alter database Apname.DBname clear data in region 'CrossJoin({[2009]},{[Dec]})';
    I am planning to use Current_year & Current_month variables instead of hardcoding 2009 & Dec as I have to use this everymonth to clear the current months data.
    If it is allowed, what is the syntax?
    Is there any alternative apart from substitution variables?
    Appreciate your thoughts.
    Thanks,
    -Ethan.

    You would just use ampersand and the variable name instead of the hard coding e.g. &yearVar &periodVar.
    Not tried it on aso clears but in theory it should work as ...'CrossJoin({&yearVar},{&periodVar})';
    just change yearVar and periodVar for your substitution variable names.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Use varialbe as a value in substitution variable

    Hi there,I incrementaly update my cube day by day.And I set a user variable in autoexec.bat to get the current date,eg '2003-06-23'.Could I use such variable as a variable's value in substition variable ?My platform is 6.5 on w2k.Regards,luau

    You can use that in a MAXL script to set the substitution variable.the MAXL script would be something like:Alter database $4 drop variable $5;alter database $4 add variable $5 $7 ;where: $4 is the app.cub $5 is the substitution variable name $7 is the value of the subs. variableRich Sullivan - Beacon Analytics

  • Unable to execute the substitution variable in calc scripts in essbase 11.1

    Unable to execute the substitution variable in calc scripts in essbase 11.1.3
    FIX(&CURRVERSION,COLA)
    Unit=units*Listprice;
    dataexport "file" "," "E:\NEW.TXT";
    ENDFIX
    Error: 1200471 Error parsing formula for FIX STATEMENT (line 1): expression expected before [)]
    This is error it throws when executing the calculation script
    I wonder whether its a problem with substitution variable i want to know wat went wrong inside the fix statement
    I have created substitution variable use maxl
    Installed the essbase in custom manner and standlone mode nt register with the shared services ,
    Is this problem with the custom installation of essbase
    Regards
    shenna

    If you remove the substitution variable and replace it with the actual value (whatever that is), does the code work? That will tell you if the issue is around the substitution variable or not.
    John -- First you race Glenn, then you race me -- and you always win. :)
    Regards,
    Cameron Lackpour

  • Use of Essbase substitution variables in filename of a MaxL report script

    Hey guys.
    Is there a way that I can embed the value of one or more Essbase substitution variables in the filename of a report script in a MaxL command?
    I'm running a report script that uses sub. vars for entities and accounts and based on which of those members are set in the variables I want the filenames to include those member names. I'm looking for a way to include the &varName in the filename using the export database command.
    THANKS!

    Not really.
    If you want to do a lot of string mangling in a script outside of the report script, you can use DISPLAY VARIABLE:
    MAXL> display variable CurMo;
    application         database            variable            value
    +-------------------+-------------------+-------------------+-------------------
                                             CurMo               MayRegards,
    Robb Salzmann

  • Using substitution variable with multiple values in Maxl Command

    Hi All,
    Is there any option to use multiple values in 1 substitution variable and use them in a Maxl command.
    alter database $app_name.$db_name clear data in region '{CrossJoin(CrossJoin(CrossJoin({StrTOMbr(&Months)},{XXX, YYY}),{StrTOMbr(&CURYR)}), {ZZZ})}'physical;
    In the above case
    Maxl is not working if I have multiple months in &Months Substitution variable.
    Let me know if there is an alternate option to implement this.
    Thanks
    Sathish

    What is the value of &Months?
    If you put that exact value into the code, does it work?
    Regards,
    Cameron Lackpour

  • MaxL Pass parameter zu create substitution variable

    Hi everybody,I'm trying to pass a parameter from a DOS batch file to a MaxL script to create a substitution variable with that parameter.DOS batch file:...set var_version = "Final Version"essmsh Test.msh %var_version%MaxL file:....alter application TEST set variable SUBST_VERSION $1=> the substitution variable should be "Final Version" (incl. double-quotes because of the whitespace in the variable's value), but in fact, the substitution variable will be "Final" (without any double-quotes; they have been stripped by MaxL!?)=> if I don't use a parameter it works:alter application TEST set variable SUBST_VERSION '"Final Version"'=> I tried the following statement to keep my double-quotes, but the parameter won't be expanded then:alter application TEST set variable SUBST_VERSION '"$1"'So, does anybody know how to pass a parameter containing whitespaces to create a substitution variable within a MaxL script?Thanks for your hints!Marc

    Hi,Try this one:1. Create batch file which will produse you a whole MAXL statement. This can be done with > or >> statement at the end of the commanad.E.g.: whole_command_with_"Final" >> to file.txt2. Execute maxl with above generated file.Hope this helps,Grofaty

  • Substitution variable maxl from batch dynamic

    Hi,
    I have set up a batch file which is calling .msh file which changes my substitution variables.
    I am running this command: "alter database App2.Plan1 set variable 'ActMonth1' 'Jul';"
    "alter database App2.Plan1 set variable 'ActMonth2' 'Aug';"
    "alter database App2.Plan1 set variable 'ActMonth3' 'Sep';"
    I want my values Jul. Aug and Sep to change dynamically. E.g. In Database i will say this forecast starts in Sep so i will get values Sep, Oct, and Nov to my values for ActMonth1, ActMonth2, ActMonth3
    Is this possible? Or how can i make it automatically?

    Hi,
    Would it be alright just to pass the values into to maxl script from a batch script.
    essmsh var.mxl Jul Aug Sep
    Then your maxl script picks up the values e.g
    alter database App2.Plan1 set variable 'ActMonth1' $1;
    alter database App2.Plan1 set variable 'ActMonth2' $2;
    alter database App2.Plan1 set variable 'ActMonth3' $3;
    Then you would just change the values being passed into the maxl.
    The values being passed in could be generated by some logic in the batch script.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • MAXL to update substitution variable

    I want to confirm that using the MAXL statement to alter a substitution variable that is not specific to any APP or any DB will not work.
    In other words, the MAXL statemet to alter a substitution variable will only work if that variable is assigned to an app and and DB..
    Thanks

    Doesn't "alter +system+ set variable..." work?

  • MaxL statement for substitution variables

    Hi,I'm trying get a script together that changes all my substitution variables, and I'm able to do this using:alter database application.database set variable string;but how do I set the substitution variables for (all apps) and (all dbs)?Any help appreciated.ThanksSunil

    I don't think MaxL is going to do this for you, although you could always use a positional parameter to set the value.
    I'm not a big fan of passing the system date to an Essbase process as it so often varies from the data date.
    Usually, I create an external scripting process (in my case, in the past, usually VBScript, I would probably tilt towards perl now) that read the file, found the year and month, and then called the MaxL with parameter lne variables to set the Substitution Variables. This is not fancy code -- the error checking is the majority of the work.
    Regards,
    Cameron Lackpour

  • Maxl statement for substitution variable..

    Friends,
    Do we have a maxl command that will return substitution variables at the server level along with their values.
    This would help us do a quick check of the system at all environments using VLOOKUP before the cycle starts..
    The manual check seems boring :(
    Thanks,
    RN.

    Sir, I love the way u write your blogs :)
    this blog was just awsome with the conversation with JJ explaining with such details..^^^Thank you for your kind words. It really makes my day when I hear that people get real value out of my blog. But to be honest, I am but a conduit for Jason's knowledge. :)
    Regards,
    Cameron Lackpour
    P.S. You should check out his death-to-Load-Rules post. Very cool stuff.

  • Maxl export substitution variable

    Is there a way to use a substituion variable in the text file name for an export. For example, I want it to export to DataMay.txt or DataJune.txt
    export database 'NS11_819'.'GL_11510' using server report_file 'Revenue' to data_file '/app/hyperion/essbase/app/NS11_819/GL_11510/DataSUBVARIABLEHERE.txt' ;

    I'll second Sean's comment that there's no clean Maxl-only way to do this.
    Having said that, you can certainly use native Maxl variables to sort of get there.
    1) Use Maxl to display the value of the substitution variable to a text file: display variable VARIABLE-NAME after you've spooled to a file.
    2) Use VBScript/Perl/whatever to read that file and get the value and generate the line that calls the code.
    3) Use positional variables to push that value to the export statment.
    That #2 bit is the pain. You could use proper Maxl variables but now you're talking about managing the code. With positional (parameters) you only have to programmatically generate the calling line.
    That line looked like the following using a Maxl file called "maxltest.msh" to parametrize/positionalize the output file:
    c:\>essmsh maxltest.msh '"c://temp//sample.basic.txt"'
    NB -- This is on Windows and I wrapped the file name in double quotes and wrapped the double quotes in single quotes. Yikes.
    Regards,
    Cameron Lackpour
    Edited by: CTL on Aug 25, 2008 1:51 PM
    Edited because the new board doesn't like double back slashes and I can't be bothered to figure out what HTML rule I'm breaking. Now with double forward slashes.

  • Problem setting the value of a substitution variable in a calc script

    Hi, All.
    I'm trying to update the value of a substitution variable inside an IF statement and I'm having trouble.
    Here's the code:
    *"Jan"(*
    IF  (LoopCounter = 1) &varEntity = "100";
    ENDIF;)
    the error I get back from EAS is:
    Error: 1200336 Error parsing formula for [Jan] (line 54): [(] without [)]

    I know CL knows a lot about HBR, if he's around today... LOL
    As a matter of fact, I just used an HBR (not using Calc Manager till I have to)'s macro functionality to drive fx for different Scenarios in a Planning app. Here's how I call the macro:
              /*     Call the macro mcrFxCoreOutYears for the four fx rate types for ALL 12 months of the year.     */
              FIX(&BudYear)
                   %mcrFxCoreOutYears(Constant)
                   %mcrFxCoreOutYears(Comparable)
                   %mcrFxCoreOutYears(Estimate)
                   %mcrFxCoreOutYears(Actual)
              ENDFIXI pass the Scenarios Constant, Comparable, Estimate, and Actual to the macro mcrFxCoreOutYears. You can apply HBRs against Essbase.
    I believe (I can't remember what exactly -- is it that templates don't accept parameters? That seems hard to believe. Looking at a CM template, that does seem to be the case. Bummer if I'm right.) that Calc Manager BRs have less functionality wrt templates, but I haven't worked with CM for over a year.
    It works really well -- a single place to maintain code and no appreciable performance cost.
    You cannot launch a HBR from a MaxL script but HBRs can be launched from command lines -- this may constrain where you place your automation (it basically has to run off of whatever the EAS server is. You may end up shelling out of MaxL to execute the HBR or even execute scripts across servers -- that does get more complicated.).
    Anyway, if you have any more questions, ask away -- it really is a very powerful component. I will have to look at CM more closely (sooner or later I will lose the HBR vs CM argument and at least need to know if templates support parameters) to see if I'm right on what I wrote above.
    Regards,
    Cameron Lackpour
    P.S. You cannot define an ARRAY in an HBR macro because ARRAY arrayname[value] gets read as a parameter. I ended up declaring the array in the calling HBR.
    P.P.S. I really need to write up the fx approach in a blog post -- it is wicked fast and really easy to use. Too many other posts in the queue already.
    Edited by: CL on Aug 24, 2011 1:48 PM

  • Report script - using substitution variable with multiple values

    Hi All,
    Substitution variable with multiple values is not working correctly with Report scripts. Can you please let me know what is the syntax to assign multiple values to a sub variable using maxl:
    alter database samp.samp set variable 'ExtractQuarter' 'Q1,Q2,Q3,Q4';
    alter database Samp.Samp set variable 'ExtractQuarter' 'Q1:Q4';
    I tried both of the above but they are errored out with the below error:
    Error: 1001005 - Unknown Member [Q1:Q4] in Report.
    my requirement is different for both Actual and forecast data extract so i would like to make use of this variable to extract whole year data for Forecast and current quarter data for Actual with out duplicating the report scripts for both processes.
    Thanks,
    PRaveen

    Hi,
    Please refer following thread,
    range of months in report script?
    Hope it helps.
    Regards

  • Essbase server - automatic change of substitution variable from SQL

    Hi,I would like to automaticaly change the substitution variable in Essbase Server. Is it posible to change the substitition variable from external source e.g. SQL statement?Simple sample:I would like to assign value "2003" to "CurYear" substitution variable. But value "2003" I would like to get from SQL:"select year(current date) from table".There are commands in Esscmd and MaxL Shell, see bellow.Esscmd command:CREATEVARIABLE "CurYear" "localhost" "" "" "2003";MaxL Shell:alter system set variable CurYear '2003';Is it possible to get the value '2003' from SQL and pass this value to Esscmd command or MaxL Shell?My system:Windows 2000 Professional Service pack 4Essbase at 6.5.3 levelThanks,Grofaty

    You can create a text file from the SQL server that writes the command like"CREATEVARIABLE "CurrYear" "Servername" "AppName" "DBName" "2005";then you can create a schedule job that would run this script which can update the variable. CREATEVARIABLE creates/replaces the current variable.

Maybe you are looking for

  • SOAP Adapter:  Exception in method process

    Hello Experts, We are getting from time to time on the Receiver SOAP Communication Channels the folowing error: Delivery of the message to the application using connection AFW failed, due to: Exception in method process. We are getting this error on

  • HT5654 How to restore my IPAD

    Hello, how do I restore my IPAD, it is showing power cable and itunes icon on start-up window

  • How can I get ArcSoft Photostudio 6 to open pictures from iPhoto?

    Moving from PC to iMac.  On PC, I could load and also save to my photo library from Photostudio 6.  But when I see my iPhoto library when trying to open from Photostudio 6, it's pale and I can't open it.  Is there a way to unlock this, or be able to

  • LabVIEW 8.0, Crystal report - PDF

    Has anyone tried developing a crystal report, and calling it in LabVIEW 8.0 via .NET dll so it prints a pdf report similar to printing a standard report? Kudos always welcome for helpful posts

  • Arbitrary ordering?

    Querying dba_constraints, I might finish with an 'order by constraint_type'. But this now means that unique constraints are listed after foreign keys because 'R' sorts before 'U'. If I'm running the query to generate the SQL to re-create the constrai