MAXL Script to update Member Filters

Hoping someone can point me in the right direction.<BR><BR>I've created a MAXL script which changes the lines on a Member Filter, effectively changing it from a READ to a WRITE. The only problem is after the MAXL script has run the User loses the Filter assigned to them.<BR><BR>Is there any way of getting the Filter to stay with the user.<BR><BR>Many Thanks<BR><BR>Mark

Rosi wrote:
Hello -
Yes. Here is an example of the maxl script -
login 'Hypadmin' '#########' on myessbaseserver;
spool on to 'mymaxl.log';
/* Setting the substitution variable */
alter database appname.databasename set variable 'CurMonth' 'Aug';
display variable all;
spool off;
Logout;
Exit;
You can call this maxl from a batch file scheduled from windows scheduled task.
RegardsThanks very much for your help!

Similar Messages

  • Dropping a essbase cube member through Maxl Script

    Hi,
    Can anybody suggest, how I can delete the the member of a cube through MaxL Script.
    Is this achievable ??

    I think what you're trying to do (delete a member from a dimension) can be done in MaxL through a data load rule and an appropriate dimension load file.
    See: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_eashelp/dbdbstdb.htm for more information re "remove unspecified".
    Also see http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/imp_dims.htm for the MaxL statement "import dimensions".
    Lastly, see: http://www.network54.com/Forum/58296/thread/1225372045/Deleting+Members+within+a+Member+Name+in+the+outline+not+manually+but+automatically+- for a fairly indepth discussion of this issue.
    Regards,
    Cameron Lackpour

  • How to change the Existing alias with new alias name...MAXL SCRIPT

    HI Experts
    I need to change alias name of the existing member with new alias name.
    please send me maxl code to change the alias name .
    My thought is
    1) Old alias should be replaced with new alias name .
    2)There is one account that should be rolled out to another parent..these parents are already exsist
    3) I need a MAXL Script to change the new alias name .
    please suggest ASAP.
    Thanks
    USER

    John
    I heard that we can replace existing alias name with new alias thru MAXL
    i.e replace alias name XXXX member with YYYY ;
    please correct me if iam wrong ,might be Maxl command is wrong but this is the idea.
    Thanks
    USER

  • Weird problem using "Login" in MaxL script

    Hi there
    I have created a MaxL script for loading som data into an Essbase. The script you can see below.
    login 'user' 'password' on 'nkm18k14';
    import database 'realtest'.'Loadtest'
    data from text data_file '\\nkm18k00\Planning\Loaddata\lonbud.txt'
    using server rules_file 'LonBLoad'
    on error write to '\\nkm18k00\Planning\Errorlogs\realtest.txt';
    When I try to execute it, as it is i get the following error "(3) Syntax error near ['$'], which im guessin is line 3, right?
    When I remove line 1 (the login statement), the script runs just fine. What is goin on, any ideas?
    I as a user have write acces to the network locations specified, could it be that the essbase uses som kind of system user that doesn't have acces to the network location?
    Any valuable input will be appreciated.
    Regards, Jacob

    It's true that they are not "needed" from a security approach, but from a maintenance approach you still end up having to touch a large number of scripts if you store the connection details in them.
    As a system user, you don't even have to change the password -- but if you have someone leave the company you may just want to.
    Either way, I would never want to hard code connectivity details inside dozens of scripts when I can keep it in a single place.
    Here is the MXL_Shell file for Windows -- you can obtain the SendEmail.exe from multiple places, but the syntax should be validated.
    The location of the scripts, log files, and batch items can of course be modified to your liking as well...
    The Errors that are ignored are stored in a file called "IGNORED.TXT" in the Batch directory (see below for what I ignore).
    @echo off
    REM ================================================================
    REM   MXL_Shell.cmd - Wrapper to call EssMsh (MXL) scripts
    REM ----------------------------------------------------------------
    REM   Author: Doug Bliss
    REM   Initial QC: 5/21/2005
    REM ----------------------------------------------------------------
    REM   Script to Execute should be base name (without extension)
    REM   Script should exist in the ..\Scripts directory
    REM   Both StdOut and StdErr are redirected to ..\Logs\<Script>.log
    REM   Call activity is logged to ..\Logs\Daily_ddmmyy.log
    REM   Log file is appended to ..\Logs\<Script>.hst at finish
    REM   Log file is processed for "Error" tokens to determine if
    REM      the result was successful or not
    REM   Notifications are taken from comment blocks in the script:
    REM      /* Notifications:
    REM         ONSUCCESS [email protected]
    REM         ONERR [email protected]
    REM       */
    REM   Localization details: Update the variables set immediately below (typically SRCPATH and EMAIL*)
    REM ================================================================
    SET SRCPATH=C:\Automation
    SET EMAILDOM=<yourcompany.com>
    SET EMAILRELAY=<relay>.%EMAILDOM%
    SET DEVBOX=<devboxname>
    SET IGNORE=%SRCPATH%\Batch\Ignored.txt
    SET MXLFILE=%SRCPATH%\Scripts\%1.mxl
    SET LOGPATH=%SRCPATH%\Logs
    SET LOGFILE=%LOGPATH%\%1.log
    SET ERRFILE=%LOGPATH%\%1.err
    SET HSTFILE=%LOGPATH%\%1.hst
    SET DAYFILE=%LOGPATH%\Daily_%date:~4,2%%date:~7,2%%date:~10,4%.log
    REM ################################## Step 1: Sanity Checks
    IF "%1"=="" EXIT /B 1
    IF NOT EXIST %MXLFILE% EXIT /B 2
    REM ################################## Step 2: Initialize Log entries
    IF NOT EXIST %LOGPATH%\. MKDIR %LOGPATH% >nul
    IF EXIST %ERRFILE% MOVE /Y %ERRFILE% %SRCPATH%\Logs\%1.bak.err >nul
    IF EXIST %LOGFILE% MOVE /Y %LOGFILE% %SRCPATH%\Logs\%1.bak.log >nul
    REM ################################## Step 3: Call the Script
    ECHO %time% -- Calling EssMsh Script: %1.mxl %2 %3 %4 %5 %6 %7 %8 %9 >>%DAYFILE%
    ECHO ============================== ESSBASE SESSION LOG >%LOGFILE%
    ECHO Log Opened: %date% %time% >>%LOGFILE%
    CALL User.cmd
    essmsh.exe -s %COMPUTERNAME% -u %UID% -p %PWD% %MXLFILE% "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9" >>%LOGFILE% 2>&1
    REM ################################## Step 4: Post Processing
    REM #### Daily Log Entry (return call)
    ECHO %time% -- Returned from Maxl Script: %1.mxl >>%DAYFILE%
    ECHO Log Closed: %date% %time% >>%LOGFILE%
    ECHO ============================== END OF SESSION >>%LOGFILE%
    REM #### Process Error entries and filter via Ignored.txt file
    TYPE %LOGFILE% | FIND "ERROR" >%ERRFILE%
    FOR /f "tokens=1" %%a in (%IGNORE%) DO TYPE %ERRFILE% | FIND /V "%%a" >%ERRFILE%
    FOR %%a in (%ERRFILE%) DO SET /a ErrCount=%%~za >nul
    IF '%COMPUTERNAME%'=='%DEVBOX%' (
         SET TYPE=NON-Production
         SET SVR=development
    ) ELSE (
         SET TYPE=Production
         SET SVR=production
    IF %ErrCount% EQU 0 (
         ERASE /Q %ERRFILE%
         SET SUBJECT=Essbase %TYPE% Script Completed
         SET MESSAGE=Maxl script '%1' has successfully completed on the %SVR% server.
         SET ATTACH=
         SET RESULT=SUCCESS
    ) ELSE (
         REM ################################## ERROR Processing
         SET SUBJECT=Essbase %TYPE% Script Error
         SET MESSAGE=Errors were detected in Maxl script '%1', the job's log and error files are attached.
         SET ATTACH=%LOGFILE% %ERRFILE%
         SET RESULT=ERR
    TYPE %MXLFILE% | FIND "ON%RESULT%" >Notify.tmp
    FOR /f "tokens=2" %%a in (Notify.tmp) DO SendEmail -f %COMPUTERNAME%@%EMAILDOM% -t %%a -u "%SUBJECT%" -m "%MESSAGE%" -s %EMAILRELAY% -a %ATTACH%
    ERASE /Q Notify.tmp
    ECHO. >>%DAYFILE%
    ECHO. >>%HSTFILE%
    TYPE %LOGFILE% >>%HSTFILE%
    :FIN
    ECHO.
    EXIT /B %ERRCOUNT%Here is my IGNORED.TXT file (only the code itself is used, the rest is for reference).
    0000000  This file contains Essbase Error codes which should be ignored by ESS_Shell.cmd or MXL_Shell.cmd
    1051083  This substitution variable does not exist.
    1003029  Encountered formatting error in spreadsheet file [%s]
    1090010  Error in File [%s] Which is a [%s] Spreadsheet
    1051068  Database is not in archive read-only mode

  • MAXL Script

    I'm having trouble with running a MAXL Script. I have a macro in Access that creates my load table. The last command in the macro is "essmsh loadcube.msh".The shell will open, but doesn't take input from the file. The file contents are:login user pswd on server;set message level all;import database Invstmnt.Invstmnt data from data_file 'C:\Hyperion\Essbase\Client\loadinv05.xls' using rules_file 'T:\App\Invstmnt\Invstmnt\Data05.rul' on error append to 'C:\Hyperion\Essbase\Client\errorinv.log';execute calculation 'SET MSG ERROR; CALC ALL;' on Invstmnt.Invstmnt;logout;exit;Is this incorrect??? These steps work fine when I key it into the shell.

    I am making the assumption you want to update a substitution variable, not a 'global' variable. Symantecs of course as they are global, but hope I get you heading down the right path.
    Yes, you'll need to use the Alter Database command. You must first drop the variable then add the variable you want.
    ex:
    alter database $4.$5 drop variable pyryear;
    alter database $4.$5 add variable pyryear;
    alter database $4.$5 set variable pyryear "FY07";
    obviously this is a snipit of code I have from a MaxL automation with positional variables included, but this should have you heading in the proper direction.

  • Auto-kick off MaxL script after Oracle GL data load?

    Hi guys, this question will involve 2 different modules: Hyperion and Oracle GL.
    My client has their accounting department updating Oracle GL on a daily basis. My end-user client would like to write a script to automatically kick off the existing MaxL script which is for our daily data load in Hyperion. Currently, the MaxL script is manually executed.
    What's the best approach to build a connection for both modules to communicate with each other? Can we use a timer to trigger the run? If so, how?

    #1 External scheduler.
    I've worked on Appworx and it has build a chain dependent task. There are many other external schedulers like Tivoli,....
    #2 As Daniel pointed out you can use Windows scheduler.
    For every successful GL load add a file to a folder which is accessible for your Essbase task.
    COPY Nul C:\Hyperion\Scripts\Trigger\GL_Load_Finished.txt
    Create another bat file which is scheduled to run on every 5 or 10 mins (this should start just after your GL Load scheduled task)
    This is an example i've for a triggered Essbase job.
    IF EXIST %BASE_DIR%\Trigger\Full_Build_Started.txt (
    Echo "Full Build started"
    ) else (
         IF EXIST %BASE_DIR%\Trigger\Custom_Build_Started.txt (
         Echo "Custom Build started"
         ) else (
              IF EXIST %BASE_DIR%\Trigger\Post_Build_Batch_Started.txt (
              Echo "Post Build started"
              ) else (
              IF EXIST %BASE_DIR%\Trigger\Start_Full_Build.txt (
              Echo "Trigger found starting batch"
              MOVE %BASE_DIR%\Trigger\Start_Batch.txt %BASE_DIR%\Trigger\Full_Build_Started.txt
              call %BASE_DIR%\Scripts\Batch_Files\Monthly_Build_All_Cubes.bat
              ) else (
                   IF EXIST %BASE_DIR%\Trigger\Start_Custom_Build.txt (
                   Echo "Trigger found starting Custom batch"
                   MOVE %BASE_DIR%\Trigger\Start_Custom_Batch.txt %BASE_DIR%\Trigger\Custom_Build_Started.txt
                   call %BASE_DIR%\Scripts\Batch_Files\Monthly_Build_All_Cubes_Custom.bat
                   ) else (
                        IF EXIST %BASE_DIR%\Trigger\Start_Post_Build_Batch.txt (
                        Echo "Trigger found starting Post Build batch"
                        MOVE %BASE_DIR%\Trigger\Start_Post_Build_Batch.txt %BASE_DIR%\Trigger\Post_Build_Batch_Started.txt
                        call %BASE_DIR%\Scripts\Batch_Files\Monthly_Post_Build_All_Cubes.bat
    )So this bat file if it finds Start_Full_Build.txt in the trigger location, it'll rename that to Full_Build_Started.txt and will call the Full Build (likewise for custom and post build)
    Regards
    Celvin
    http://www.orahyplabs.com

  • Cahnge the date  dynamically in Maxl script

    Hi All,
    I am excuting one max for clearing the data for particuler cells it s ok
    It will work for 9th month but next month it will not work until i dont change the value manually
    Dynamically i need to change
    alter database 'ACCOUNT'.'account' clear data in region '{([2010.09],[Actual])}' physical;
    how can i do this , any help would be appriciated..

    I think he wants to avoid updating anything manually though?
    you should be able to:
    a. Build the date/string in a batch file.
    b. pass that date/string to the maxl script as a paramter
    c. use the parameter in your alter database script
    I have also seen people rebuild the entire maxl script each month from a skeleton in another text file or a database but thats probably over complicating.
    You could also use that variable to update a substitution variable

  • Maxl Script running Issue in Essbase 11.1.2.2

    Hi All,
    We have a Maxl Script which takes Level 0 Backup of the Database. We have migrated the apps to the new server 11.1.2.2 and this script is not running in the new server but it works fine in the Old Server.We have the code like this in the script
    REM $1 = USERNAME
    REM $2 = PASSWORD
    REM $3 = servername
    REM $4 = BSOAppName = RPSBSO
    REM $5 = BSODB_Name = RPSBSOD
    REM $6 = ASOAppName = RPSASO
    REM $7 = ASODB_Name = RPSASOD
    essmsh C:\Hyperion\Automation\MAXL\Backup_BSO.msh Username  password gvw3086-v.atlanta.hp.com  RPSBSO RPSBSOD RPSASO RPSASOD
    When i run the .bat script  an Fatal Error is shown under the above line saying
    MSH Fatal Error: Error Initializing localization module.
    I have changed all the path locations,server names etc according to the new environment in the script but the script is displaying error like above. Can any one help me on this.
    Regards,
    Naveen

    972698 wrote:
    Hi John Thanks for your post.
    I would like to give some more information like this is the script named BU_BSO_2.bat which is used for taking backup of individual application  RPSBSO,  and  it calls  Backup_BSO.msh script which is internally called in BU_SO_2.bat file as given below the command. What we do is we just run this BU_BSO_2.bat batch file where it executes  everything and places the backup in given path in the script. But actually  its giving error in executing only the given below line
    essmsh C:\Hyperion\Automation\MAXL\Backup_BSO.msh Username  password gvw3086-v.atlanta.hp.com  RPSBSO RPSBSOD RPSASO RPSASOD
    Error shown :   MSH Fatal Error: Error Initializing localization module
    And i went through your doc but they are the server  specific paths which we are not using in this script and this script runs fine in 11.1.1.
    Let me know if i can provide any more information.
    Regards,
    Naveen
    Try updating
    essmsh C:\Hyperion\Automation\MAXL\Backup_BSO.msh Username  password gvw3086-v.atlanta.hp.com  RPSBSO RPSBSOD RPSASO RPSASOD
    to
    startMaxl.bat C:\Hyperion\Automation\MAXL\Backup_BSO.msh Username  password gvw3086-v.atlanta.hp.com  RPSBSO RPSBSOD RPSASO RPSASOD
    If the location of startMaxl is not in the windows path variable you will need to either update the path variable or put the path in the script e.g.
    C:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startMaxl.bat
    or C:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseClient\bin\startMaxl.cmd
    Alternatively edit startMaxl and take the variable information out of it and put it in your script then you will be able to use essmsh.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Automation process in Workspace (using MaxL script)

    Hi All,
    I have a MaxL script to export Level 0 data and to update new data in a database
    It is working fine.
    I have tried to schedule it, and its also working fine.
    But according to my requirement, i have to publish this MaxL script in workspace as a job or as a file so that I can run this MaxL script in workspace only.
    I have tried some way but didn't get success.
    So help me to solve my problem
    Thanks in advance

    We are using workspace and jobs to automate our processes. Here is how we do it:
    In the server that runs workspace, we place the batch or exe that needs to be run. Then we set up a job factory using that same batch file.
    Then on workspace we import this batch file as a generic job with the associated job factory and DONE!
    Next time you execute the job from workspace, that batch file will run from your workspace machine.
    send me an email to [email protected] and I'll give you the documentation that we used to set it up in more details.

  • Can you suggest me how to run multiple calc scripts using singel maxl script

    Hello,
    I am writing a maxl script which should be able to :
    1. update Set Variables for the Essbase DB
    2. Execute multiple calc scripts
    2a. Trying to put specific sleep time within multiple calc scripts.
    Thanks and Regards.

    Why are you looking for a Maxl to run multiple maxls? Can't you use a batch or sh script to do it.
    Unix has a sleep command in batch file try using choice
    Regards
    Celvin

  • Maxl scripts to perform backup of the following

    Help me with these (Maxl script to do these backups)
         How to take Backup of filters (use maxl script to get filter information of all native cubes).
         Since we use xref calc a lot so we need to backup information of location alias.     
    We have partitioning so we need to get partition information backed up.

    Hi,
    Filter information is stored in the essbase.sec file so it is good start to make sure that is being backed up.
    As for extracting filter information by maxl you can do it with something like :-
    login admin password on localhost;
    spool on to 'c:\temp\filters.txt';
    display filter row all;
    spool off;
    logout;
    or if you want to narrow the filter down to a database use
    display filter row app.db;
    You will also need to change the column width to fit all the filter in e.g.
    set column_width 50;
    You can also dump the whole security file to a text file if you wanted which includes all the filter information (from 9.3.1)
    export security_file to data_file C:\temp\sec_file.txt;
    I take it your partitions don't change very often so you can easily just export the partition to xml from EAS, depending on what you are on.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • MaxL Script Issue

    Hello everyone-
    I have a need to track when data is posted to an account for the first time within certain departments. Individual departments are created as a combination of three dimensions: Company, LOB, and Entities. For example, I wish to track data that is posted to C601 or C602 in the company dimension, L10 in the LOB dimension, and D140 or D145 in the Entities dimension.
    I'm a newbie in MaxL, but my thought is that creating a trigger in MaxL may be the best way of going about this. I tagged all accounts that currently have data in the departments I wish to track with a UDA of MktgAcct. What I want to do is create a spool if there is any data that is loaded to an account not tagged as MktgAcct within any combination of the members listed above. I'm trying to do this through a MaxL script and my attempts at this are below. I know what I have won't work, but it's an example of what I'm trying to do conceptually. Can anyone give me some guidance on making this work? Thanks so much in advance!
    CREATE OR REPLACE AFTER UPDATE TRIGGER 'CCRCRPT'.'Finstmt'.'Mktg'
    WHERE
    CROSSJOIN({[Net Income].CHILDREN},
         {([Company].[C601], [Company].[C602], [LOB].[L10], [Entities].[D145], [Scenarios].[Actual], [Versions].[Final], [Years].[FY08])}
    WHEN NOT(UDA([Accounts], "MktgAcct"))>0
    THEN SPOOL Mktg_acct
    END

    I guess you are not that far from making it work.
    Here some remarks :
    In your "WHEN" condition you are using the "NOT" operator which is a "boolean" therefore returning TRUE or FALSE not a value.
    As for your UDA(Accounts, "MktgAcct"), the MDX UDA function returns a set of members having the UDA=MktgAcct which is not what you want, I guess.
    Maybe you could try smthg like this :
    WHEN NOT(ISUDA(Accounts,"MktgAcct")) AND [Accounts].CurrentMember > 0
    Hope it helps,

  • Maxl Script will not write to error file for data laod.

    Sorry Glenn here is the new thread. I re ran without the semi colon after data 3 and the same error came up without anything being written to the error file.
    I purposely removed a member from the orginal outline that is included in the data loaded but yet the error file is not written to. I tried doing the load manually but executing it in the background, error file is to be created on my local HD but it does not write it there. Checked the output and it is written to a directory located on the server. Although i think this is normal.
    Could it be that it will not write to a local drive? I am going to try specifying a spot on the server to see if it runs there.
    thanks
    Original post below.
    Hello,
    I am also having this issue.
    I will include my script below but will state some details before
    We are on Essbase 11.1.1.3
    I am running Admin Console from my client PC that connects to the server in the script and I read that in this set up the error file will not get written to. This documentation was for v 9.1.3
    Here is my script (i changed some of the names)
    login 'user' 'password' on server';
    create application 'Money1' as 'Money2';
    spool stderr on to 'errorfile';
    import database 'Money1'.'Main' data
    from local text data_file 'Money1_Data.txt'
    using server rules_file 'Data3'
    on error append to 'dataload.err';
    execute calculation 'CALC ALL;' on 'Money1'.'Main';
    logout;
    spool off;
    exit;
    here is the error output i get:
    code line: on error append to 'dataload.err';
    Statement executed with warnings.
    (3) Syntax error near ['$']
    I don't see a dollar sign anywhere in my code and the error file does not get produced.
    Also do error files get written too if the actins are executed in the background?
    Thanks!
    Alex

    This works for me in a MaxL script run through essmsh.exe:
    import database appname.dbname data from local text data_file "d:\\datafilename.txt" using server rules_file "rulename"
         on error write to "d:\\errorfilename.err" ;Sometimes EAS (I think you are running it through that) does weird things to MaxL. I eschew MaxL in EAS as much as possible (like 100% of the time).
    NB -- the datafilename and errorfilename and their drive letters are local to wherever you're running this process through the MaxL shell. I don't know how that works when you're running EAS -- are drives local to your session, local to the EAS server? Dunno. Leave EAS behind, buy TextPad (no I am not the author of that fine product) and download the MaxL syntax library, and be happy. :)
    Regards,
    Cameron Lackpour
    Edited by: CL on Oct 7, 2010 7:12 AM
    Put the MaxL into a code block to get it to display correctly.

  • Copying substitution varibale using Maxl script

    Hi,
    Ive been trying to copy application using Maxl script in essbase to take backups. Everything gets copied except substitution variables. Could some one help me in sorting out this issue.
    Is there any specific Maxl Command to copy substitution variable alone from one application to another, if so could u please share it with me.
    thanks

    Hi,
    Unfortunately, as John said, there is no command to copy the subvars. One of my colleagues ran into this same issue on one of my projects. He ended up spooling a script with display variable all command to show all your variables and write them to a text file. from there he wrote a batch file to parse the text file for each of the variables, and then updated the subvars in the backup application with these values.
    The thing you want to look out for here is that you want to make sure you properly handle checking for whether the subvar already exists in the backup application. If it does, you just want to run an update of the value. If it doesn't exist, you want to add it first. This is because there is no create or replace variable, so to avoid any errors, you need to be careful with that. I think you may want to look into some of the other alternatives John provided if you are still looking into this issue.
    Thanks,
    Daniel
    http://www.DVEPM.com

  • Using $ sign on MaxL scripts

    Hi all,
    How does using $ sign on MaxL scripts work? I have seen scripts that $ sign was used instead of username, password, server name, etc. What are the advantages of using it and how can it be set up?
    Thanks in advance.
    A

    $ are used to denote variables and to be pedantic about it, encrypted usernames and passwords which I guess are used sort of like variables.
    I use them all the time unless the MaxL script is super quick, dirty, and disposable. And they never end up being disposed of.
    Check out this part of the Tech Ref for all you ever wanted to know about variables in MaxL:
    http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/maxl_syntax_vars.html
    If you want to get a different take on them, check out ODTUG's Resource Center and my presentation from 2009 to get a feel for how they can be used in scripting. My blog also has a post from 2009 on how to use variables under the "Fixing Planning's Filters" topic.
    Regards,
    Cameron Lackpour

Maybe you are looking for