Maxl Clear Script with Substitution Variables

Hi,
I am new to Maxl and I am trying to write a clear script with Maxl on an ASO Cube. The script should only clear data on a certain version and year that changes every month. I am using the following syntax and it doesn't work.
alter database ASOSamp.Sample clear data in region '{[&SV_CurrentPeriod]}';
What is the correct syntax here?
thanks,

alter database ASOSamp.Sample clear data in region '{[&Test]}';...with the subvar 'Test' set to Jan...works on my 11.1.2 test system.
Incidentally, when you say "it doesn't work", do you mean you get a MaxL error, or it doesn't clear the expected region? I was assuming the former, but you don't say.

Similar Messages

  • 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

  • Creating a range with Substitution Variables for Report Script

    Is it possible to create a range with substituion varables for use in a report script. For example instead of listing "Jan" "Feb" "Mar" "Apr" in the report script can I use a sub varaible like Jan:Apr that will list them all out?

    while I have not had luck with ranges in report scripts, others have. You could have a substitution variable the is "Jun" "Jul " "Aug" or whatever you want the members to be. and it will replace jusr fine

  • Pb to setup replicated partition with substitution variables

    Dear all,
    I have the following problem with the replicated partition by using the substitution variables :
    I would like to create a replicated partition using 3 substitution variables: &CurrPeriod, &CurrWeek, &CurrYear. The goal of this is to be able to copy data from application SourceApp to TargetApp every week, by changing the subst variables.
    The script I have created is :
    login useradmin identified by password on EssbServer
    alter application SourceApp load database SourceDb
    alter application TargetApp load database TargetDb
    create or replace replicated partition SourceApp.SourceDb
    Area ' "Account1", &CurrPeriod, &CurrWeek, &CurrYear, "ND_DISTRI","ND_PAGE","ND_PROD","VT", "REEL", "EUR" ' SourceArea
    to TargetApp.TargetDb at EssbServer  as useradmin identified by password
    Area ' "Account1",    "M_N",     "S_N",     "FY1" , "ND_DISTRI","ND_PAGE","ND_PROD","VT", "REEL", "EUR" ' TargetArea
    +     mapped TargetArea ("&CurrYear") to ("FY1")+
    +     mapped TargetArea ("&CurrWeek") to ("S_N")+
    +     mapped TargetArea ("&CurrPeriod") to ("M_N")+
    +     update allow;+
    refresh replicated partition SourceApp .SourceDb to TargetApp .TargetDb at EssbServer all data ;
    The issue is that this is not working. I don’t see any data when launching the Maxl script even if the script syntax is validated by essbase. The very strange thing is that when I replace the substitution variable by members, this script works fine, I see my data in the target cube. For example if I replace the subst variables by
    Area ' "Account1", “Month1”, “Week1”, “Year1”, "ND_DISTRI","ND_PAGE","ND_PROD","VT", "REEL", "EUR" ' SourceArea
    to TargetApp.TargetDb at EssbServer  as useradmin identified by password
    Area ' "Account1",    "M_N",     "S_N",     "FY1" , "ND_DISTRI","ND_PAGE","ND_PROD","VT", "REEL", "EUR" ' TargetArea
    +     mapped TargetArea (“Year1”) to ("FY1")+
    +     mapped TargetArea (“Week1”) to ("S_N")+
    +     mapped TargetArea (“Month1”) to ("M_N")+
    So my conclusion is that there is something wrong with the syntax of the substitution variable in my mapping.
    Your help on this would be very appreciated .

    Hi,
    I have the answer from Oracle support :
    Hello,
    This is a known bug.
    BUG 7418041
    This has been documented as a known issue in Essbase Release 9.3.1.3 with the following description: "Partitioning. Using substitution variables in replicated partition mappings incorrectly prevents data from replicating. [7418041]"
    Currently the development team are working on a fix, but we don't have a release date yet.
    The suggested workarounds are to use member names (which you have confirmed work) or use a Transparent partition in place of a replicated partition.

  • Multiple Insertion with substitution Variable

    Hi, I want to insert multiple values with single substitution variable in single column. I mean my query is as under.
    Add a column to infobb02 called 'Wife' and populate it with first names. If there is no wife, enter null. Write a PL/SQL loop to gather wife names from the 'user' using a substitution variable.
    That means I have to insert values of wife column by user using substitution variable and must be use loop.
    Thank you.

    You'll need a client application capable of prompting. Maybe a shell script or perl? Java? PL/SQL executes on the server and can't prompt.

  • Outline Order, Calc Script Performance, Substitution Variables

    Hi All,
    I am currently looking in to the performance side.
    This is mainly about the calculation script performance.
    There are lot of questions in my mind and as it is said you can get the results only by testing.
    1. Outline order should be from least sparse to most sparse
    (other reason : to accomodate as many sparse members in to calculator cache) correct me if I am wrong
    2. Is Index entry created based on the outline order. For example I have outline order as Scenarios, Products, Markets then does my index entry be like scenario -> Products -> Markets ?
    3. Does this order has to match with the order of members in FIX Statement of calculation script?
    4. I have 3 sparse dimensions. P (150 members), M (8 members), V (20 members).
    I use substitution variables for these three in the calculation script. And these three are the mandotary things in my calculation script. Now when I see the fix statement, these three are the first 3 parameters of the fix statemtn and since I am fixing on a specific member, placing these three members as the first 3 sparse dimensions in the outline, ill it improve performance?
    In one way, I can say that a member from P, M,V becomes my key for the data.
    Theoritically if I think, may be it will...but in practical terms I don't see any of such thing.. Correct me If my thinking is wrong.
    One more thing, I have a calc script with say around 10 FIX statements and this P,M,V is being used in every FIX statemnts. Since my entire calculation will be only on one P, one M, one V. Can I put everything in one FIX at the beginning and exclude it from remaining FIX statememts?
    5. I have a lot of cross dimensional operations in my calc scripts for accounts dimension (500 + ) members.
    Is there a way to reduce these?
    6. My cube statistics..
    Cube size : 80 GB +
    Block Size : 18 KB (Approx)
    Block density : 0.03 . This is what I am more worried about. This really hurts me.
    This is one of the reason why my calculation time is > 7 hours and some times it is horrible when there is huge amount of data (it takes aound 20 + hours) for calculation.
    I would be looking forward for your suggestions.
    It would be really apprecialble if It is Ok to share your contact number so that I can get in touch with you. That could be of great help from your side.

    I have provided some answers below:
    There are lot of questions in my mind and as it is said you can get the results only by testing.
    ----------------------------You are absolutely right here but it helps to understand the underlying principles and best practices as you seem to understand.
    1. Outline order should be from least sparse to most sparse
    (other reason : to accomodate as many sparse members in to calculator cache) correct me if I am wrong
    ----------------------------This is one reason but another is to manage disk I/O during calculations. Especially when performing the intial calculation of a cube, the order of sparse dimensions from smallest to largest will measurably affect your calc times. There is another consideration here though. The smallest to largest (or least to most) sparse dimension argument assumes single threading of the calculations. You can gain improvements in calc time by multi-threading. Essbase will be able to make more effective use of multi-threading if the non-aggregating sparse dimensions are at the end of the outline.
    2. Is Index entry created based on the outline order. For example I have outline order as Scenarios, Products, Markets then does my index entry be like scenario -> Products -> Markets ?
    ----------------------------Index entry or block numbering is indeed based on outline order. However, you do not have to put the members in a cross-dimensional expression in the same order.
    3. Does this order has to match with the order of members in FIX Statement of calculation script?
    ----------------------------No it does not.
    4. I have 3 sparse dimensions. P (150 members), M (8 members), V (20 members).
    I use substitution variables for these three in the calculation script. And these three are the mandotary things in my calculation script. Now when I see the fix statement, these three are the first 3 parameters of the fix statemtn and since I am fixing on a specific member, placing these three members as the first 3 sparse dimensions in the outline, ill it improve performance?
    --------------------------This will not necessarily improve performance in and of itself.
    In one way, I can say that a member from P, M,V becomes my key for the data.
    Theoritically if I think, may be it will...but in practical terms I don't see any of such thing.. Correct me If my thinking is wrong.
    One more thing, I have a calc script with say around 10 FIX statements and this P,M,V is being used in every FIX statemnts. Since my entire calculation will be only on one P, one M, one V. Can I put everything in one FIX at the beginning and exclude it from remaining FIX statememts?
    --------------------------You would be well advised to do this and it would almost certainly improve performance. WARNING: There may be a reason for the multiple fix statements. Each fix statement is one pass on all of the blocks of the cube. If the calculation requires certain operations to happen before others, you may have to live with the multiple fix statements. A common example of this would be calculating totals in one pass and then allocating those totals in another pass. The allocation often cannot properly happen in one pass.
    5. I have a lot of cross dimensional operations in my calc scripts for accounts dimension (500 + ) members.
    Is there a way to reduce these?
    -------------------------Without knowing more about the application, there is no way of knowing. Knowledge is power. You may want to look into taking the Calculate Databases class. It is a two day class that could help you gain a better understanding of the underlying calculation principles of Essbase.
    6. My cube statistics..
    Cube size : 80 GB +
    Block Size : 18 KB (Approx)
    Block density : 0.03 . This is what I am more worried about. This really hurts me.
    This is one of the reason why my calculation time is > 7 hours and some times it is horrible when there is huge amount of data (it takes aound 20 + hours) for calculation.
    ------------------------Your cube size is large and block density is quite low but there are too many other factors to consider to simply say that you should make changes based solely on these parameters. Too often we get focused on block density and ignore other factors. (To use an analogy from current events, this would be like making a decision on which car to buy solely based on gas mileage. You could do that but then how do you fit all four kids into the sub-compact you just bought?)
    Hope this helps.
    Brian

  • SQL data Load rule with Substitution variable

    Hi,
    I have a data load rule with MySQL as a data source. I have requirement where user does not want to see Current day data in cube and they keep changing days not to be loaded.
    I have setup the substitution variable SUBv as '2009-11-04' and have scripts to update it daily.
    Data Load rule in where condition contains
    brand = 'HP' and region = 'east' and date <> &SUBv
    Now, above where condition does not work for date <> &SUBv but if I set substitution variable SUBv as "brand = 'HP' and region = 'east' and date <> '2009-11-04' " and set load rule where condition with just &SUBv it would just work fine. I dont know whats wrong in 1st place.
    I dont want to create multiple where condition in substitution variable (Don't we have limit on them?). I have 40+ load rules which might use this SUBv substitution variable if I find a way to define it so that it work as "brand = 'HP' and region = 'east' and date <> &SUBv"
    Thanks,
    Vikram

    I did some research and came to know when using substitution variable in Load rule need to keep substitution variable first in string..
    It worked out magically.

  • Issue with substitution variable with @MDSHIFT in BR in Calc Manager

    Hi Experts,
    We have a BR in EAS which is working fine.
    and exported to Calcmanager, now while validation it is giving error "@BaseScenario" is not found.
    the code is
    @MDSHIFT("LFLSalesIncVAT_GBP_C_DHP"->&BaseScenario->"Final"->"CD_FinalPlanPL",-1,"Year",,1,"Period",);
    if i hard code it like @MDSHIFT("LFLSalesIncVAT_GBP_C_DHP"->"P7PP"->"Final"->"CD_FinalPlanPL",-1,"Year",,1,"Period",); working fine.
    is there any limitation with calc manger and substitution variables?
    Thanks
    GP

    There seems to be many issues with validations in calc manager, does the rule run if you dont validate.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Import Script with Temp Variable at Bottom of Load File - No Results

    I am running into an issue while trying to load an entity's financials using a Data Pump script to assign a temporary value for the entity number, which is located at the bottom of the report.  Here is how the import file is layed out:
    Account                Description                  Final Balance                                    
    All Accounts and information....
    Entidad: 93          A: 93
    I am trying to pull the 93 into PvarTemp1.  Is there something I need to do special in the scripting since the variable I am trying to extract is at the bottom of the data?  All examples I have been able to find on the forms show the temp variable at the top of the data that the temp vaiable is being applied.  I am very new to VB and would appreicate any help.
    Here are the scripts that I am running:
    GET:
    If Mid(strRecord, 23, 8) = "Entidad:" Then
    RES.PvarTemp1 = Mid(strRecord, 32, 2)
    End If
    GetMexicoEntity = strField
    End Function
    PUT:
    PutMexicoEntity = RES.PvarTemp1
    End Function
    Thanks in advance!

                                                               Saldo Inicial     Activ Período        Balance Final
    Cuenta                 Descripción                          06/01/13                                 06/30/13       Ajuste Balance
    12012                  PTU DIFERIDO                              -489.00                  .00              -489.00
    12018                  IETU DIFERIDO                          -13,100.00                  .00           -13,100.00
    13520                  CREDITO MERCANTIL                   13,682,407.05                  .00        13,682,407.05
    20819                  OTRAS RESERVAS                         445,751.35            86,957.38           532,708.73
    21402                  PASIVO NETO PROYECTADO                   4,887.65                  .00             4,887.65
    30101                  CAPITAL SOCIAL HISTORICO                25,791.04                  .00            25,791.04
    30151                  CAPITAL SOC. ACTUALIZADO                87,406.99                  .00            87,406.99
    30201                  RVA. LEGAL HISTORICO                  -210,712.72                  .00          -210,712.72
    30301                  UTIL/(PERD) AC. HISTORIC            -2,605,881.57                  .00        -2,605,881.57
    30501                  RESUL. ACUM. HIST.                 -10,969,131.88                  .00       -10,969,131.88
    30502                  OCI                                    -22,567.00                  .00           -22,567.00
    30721                  POSICION MONETARIA                     233,964.17                  .00           233,964.17
    30801                  CXREEXP.TRASP. DEL EJERC             1,164,673.76                  .00         1,164,673.76
    77403                  OTROS                                 -445,751.35           -86,957.38          -532,708.73
                                                                 1,377,248.49                  .00         1,377,248.49
                                                         ==================== ==================== ====================
    Criterio del Reporte:                   Reporte pedido por:        iochoa
                          Entidad: 93          A: 93
                   Fecha Efectiva: 06/01/13
                                A: 06/30/13
                 Sumar Subcuentas: S
              Sumar Centros Costo: N
                           Moneda: MN
             Suprimir Montos Cero: S
      Redondeo al Millar más Cerc: No
      Redondeo a Unid más Cercana: No
                  Moneda Reportes:                               Salida: Bal93
                                                               ID Batch:

  • Problem with substitution variable

    Hi All,
    I am facing problem with usage of substitutiion variable. I have following code in my script
    Edited by: Tarak on Mar 4, 2009 3:27 AM

    sorry I missed the script.
    create table tempdata
    (description varchar2(200))
    TABLESPACE &tspacename
    /Sqlplus is not asking for the value of tspacename.I am getting following error.
    TABLESPACE &tspacename
    ERROR at line 3:
    ORA-02216: tablespace name expectedI am not sure what is wrong with SQLPLUS setting.Can anybody help?

  • Illustrator scripting with datasets & variables

    I have a .ai file with 3 datasets containing 2 variables each. I am new to adobe scripting and am trying to write a script that will loop through the 3 datasets, swap out the variables, and save as 3 different .pdf files. I can loop and export, but don't know how to access the variables.
    Here is a snipped from what I have:
    for (var i=0; i< docRef.dataSets.length; i++){
    var ds1 = docRef.dataSets.getByName('ABC'); // ABC is a client name, but numeric index is required
    //var ds1 = docRef.dataSets.index(1); // this doesn't seem to work, but i need it to
    docRef.activeDataset = ds1;
    // I need to access the dataset variables here, where ClientName is a variable name within the dataset
    client_name = ?????;
    ds1.display();
    app.redraw();
    // ----- save changes
    filepath = '/Users/me/Documents/clients/'+client_name+'.pdf';
    saveInFile = new File( filepath );
    pdfSaveOpts = getPDFOptions( );
    docRef.saveAs( saveInFile, pdfSaveOpts );
    Thanks for any help

    markr34,
    I have never done any dataset scripting, but my eyes tell me that at this line:
    //var ds1 = docRef.dataSets.index(1); // this doesn't seem to work, but i need it to
    you'd probably want to use square brackets [1] rather than parentheses to refer to array by index.
    HTH

  • 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

  • How to Use SPOOL Command with Bind Variables

    For the Following SPOOL I want the GEN_DATE to be entered by the User at the time of execution of the SQL Script. Is it possible in SPOOL Command.
    set colsep , -- separate columns with a comma
    set pagesize 1000 -- get rid of disturbing ---- between pages
    set heading on -- Print column heading
    set trimspool on -- remove trailing blanks. eliminating the spaces up to eol
    set linesize 700 -- line size should be the sum of the column widths
    spool spool_results.csv
    SELECT *
    FROM GUI_SITE_JOURNAL
    WHERE GENDATE_ BETWEEN '2012-11-01 00:00:00:00000' AND '2012-11-02 00:00:00:00000'* ORDER BY GEN_DATE;
    spool off;
    The reason is to give the ability to user so that he can enter any range without modifying the code of the script.
    Can Any one help me please.
    Edited by: user10903866 on Feb 18, 2013 7:44 PM

    Hi,
    user10903866 wrote:
    For the Following SPOOL I want the GEN_DATE to be entered by the User at the time of execution of the SQL Script. Is it possible in SPOOL Command.Do you want the user input in the SPOOL command, or do you want it in the query?
    set colsep , -- separate columns with a comma
    set pagesize 1000 -- get rid of disturbing ---- between pages
    set heading on -- Print column heading
    set trimspool on -- remove trailing blanks. eliminating the spaces up to eol
    set linesize 700 -- line size should be the sum of the column widths
    spool spool_results.csv
    SELECT *
    FROM GUI_SITE_JOURNAL
    WHERE GENDATE_ BETWEEN '2012-11-01 00:00:00:00000' AND '2012-11-02 00:00:00:00000'* ORDER BY GEN_DATE;What is the data type oif gen_date?
    If it's a string, that's a big mistake. Information about dates belongs in DATE columns.
    If it's a DATE, then don't try to compare it to strings, such as '2012-11-01 00:00:00:00000' .
    spool off;
    The reason is to give the ability to user so that he can enter any range without modifying the code of the script.
    Can Any one help me please.One way to do that is with substitution variables:
    SET     VERIFY  OFF
    ACCEPT  start_gen_date     PROMPT "Starting date (e.g., 2013-02-18 23:00:00.00000): "
    ACCEPT  end_gen_date     PROMPT "Ending date   (e.g., 2013-02-18 23:59:59.99999): "
    SPOOL  spool_results.csv
    SELECT    *
    FROM        gui_site_journal
    WHERE        gen_date  BETWEEN '&start_gen_date'
                    AND     '&end_gen_date'
    ORDER BY  gen_date;
    SPOOL  OFFThere are security considerations. Substitution variables give devious users the power to issue any SQL command, such as DROP TABLE. Users that have SQL*Plus access already have that power, anyway.

  • Changing substitution variables through ODI

    Hi John!
    We using ODI for loading data, before load we have to clear data.
    I have 2 questions regarding this issue:
    1. Can I change substitution variables through ODI
    2. Can I execute BR in Essbase.cmd
    Regards
    Sasha

    Hi,
    1. You can call maxl to update the substitution variables, either using the pre-maxl options in the KMs
    or you can execute an OS command through an ODI procedure
    2. I am not sure what you are asking, are you asking whether you can execute BRs through ODI, if so have a read of my last blog where I covered how to do it.
    You can execute BRs by using the command line launcher, have a read of the blog anyway because it goes through the command line launcher.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Re: Enter Substitution Variable pop up

    Windows 2008 - OS
    Oracle 11.2.0.2 - Database
    SQL Developer 3.1.0.7
    I am getting a very annoying pop ups about entering a substitution variable in Oracle SQL Developer, how can I set this off?
    I get the pop up when I try to open any connection, it doesn't matter what database.

    Jim Smith wrote:
    Do you have a login.sql with substitution variables?
    Tools | Preferences | Database | Filename for connection startup script.Jim,
    Yes I had a file name and as soon as I removed it, it worked
    - thanks, really apprecaite it.
    Edited by: 868332 on Mar 2, 2012 8:08 AM

Maybe you are looking for

  • Can I buy a MacBook Pro with swedish keyboard in USA and pick it up in New York?

    Can I buy a MacBook Pro with Swedish Keyboard online and pick it up on an Apple Retail store in New york

  • Report to redetermine SNP Source of supply

    We configured Planned Order integration model to show up R/3 planned orders as SNP Planned orders in APO. However when the planners on R/3 side intervene the orders in terms of some of the fields, it passes on to APO as a planned order without source

  • User32.DLL PostMessagea

    We are creating an application with a VB front-end communicating with Forte through OLE. The VB component is successfully sending information to the Forte application. However, we are not able to communicate back to the VB front-end asynchronously du

  • Trouble Connecting To Password Protected Networks

    Hello. I'm having trouble with the wireless side of life. I'm in Japan and I'm trying to connect to YahooBB wireless with my macbook. Everytime I enter the password, there is a message saying the connection has failed. I have also tried to connect wi

  • Time Out parameter in SAP BW

    Hello I wanted to know if the Time Out Parameter in SAP BW shoul have the same value of the business object time Out parameter? Thanks for your help.