MaxL Script and batch file

I have a MaxL script that exports data from different cubes Level0. I have a batch file to call this script at daily intervals.

I want to name something out of different every day (preferably NAMEmmdd type format). I know that I can add a rename or move the lot but wonder if there is a MaxL method that will allow me to export to another name?

Current MaxL is simply
export database APP. Level0 data_file DB database ' ' $Arborpath\am1119.txt "";

Ideas or direction to go learn the answer?

T,
J

Hello

You can enter variables in maxl, so you the calling batch file can pass in a variable that contains the name of the file with the current date...

For example, you have a batch file
essmsh c:\temp\export.mxl "C:\temp\output%DATE:~3,2%%DATE:~0,2%.txt".

If that was run today it would pass in ' C:\temp\output1118.txt

Now in your maxl you just refer to the variable with

export data from database sample.basic Level0 to data_file $1;

$1 refers to the variable which has been adopted, the 1 being the position, in which it was adopted.

See you soon

John
http://John-Goodwin.blogspot.com/

Tags: Business Intelligence

Similar Questions

  • MAXL - read dynamically batch file

    Hello

    I'm on a client running Essbase 11.1.2 on Windows. I'm new to the part of the script. I'm writing a maxl script and the script of commands to move data from several systems in the environment. I wish I had maxl load files dynamically load since the name of the file may change from time to time. Need advice on how to do it.

    Thank you
    Matt

    Hi Matt,

    Both Maxl and Batch (.bat, .cmd) files accept input variables. In Maxl, if you run the myscript.mshscript:

    essmsh myscript.msh myDataFile.txt myRulesFile.rul

    inside the Maxl script, you can capture these two file passed in on it (myDataFile.txt myRulesFile.rul) name using the $1 and $2 variables. in this case $1 would receive the value myDataFile.txt, and $2 would be myRulesFile.rul

    This is known as "passing in command line arguments.

    You can do the same thing with the use of batch %1 %2 files...

    Passing the files changing name of your batch file is a bit more complicated, you'll need to read the files from the file system to get new names and move to the MaxlScript:

    CD C:\Folder\where\my\files\are
    for /f %%d in (' dir/s/b / ad') call: runMaxl %.
    Goto: eof

    : runMaxl
    essmsh myscript.msh %1

    pause

    Robb Salzmann

  • invoke vmscript and batch file

    Hi guys

    I try to activate a windows vm using the command to invoke vmscript powercli

    cmd /c slmgr / ato works fine when I run a back order but when I call it via a script, then the script just hangs

    I also tried to put the command above in a batchfile locally on the system and just use call vmscript to run the batch file, but which hangs just as

    no idea what I'm missing?

    $test = "cmd /c slmgr/ato.

    Invoke VMScript - Scripttype beats - ScriptText $test VM - $vm - GuestUser - GuestPassword - administrator

    Can you try to force a non-GUI run, as

    cscript c:\windows\system32\slmgr.vbs

    instead of just slmgr?

  • Pushing scripts or batch files in Windows VM

    I think I'm in the correct community, but if not let me know and I'll move on to the question in the correct forum.

    We use vSphere 4.0 and I would push a batch file and scripts for all our virtual machines of Windows (instead of opening each Windows vm and manually run the batch/scripts)...is it anything in vSphere that would allow me to do it, or there at - it an addon or another program that would make this possible?)

    I searched this forum, searched the help of vSphere and google than a few keywords, but I can't seem to find any information on this.

    Thank you

    Yes, VMware has an API called VIX which enables comments management, one of the features are the ability to upload or download files to and from the guestOS. VIX uses VMware Tools to perform these operations and you can run a specific command within a prompt OR download and run a script.

    For more information, VIX, please take a look here - http://www.vmware.com/support/developer/vix-api/

    There are some integration with PowerCLI cmdlets with VIX if you are more comfortable in Windows, there are PowerCLI forum you can ask your question - http://communities.vmware.com/community/vmtn/vsphere/automationtools/powercli

    So according to the language of comfort, you can easily hang VIX API using vSphere SDK for Java, PowerCLI, Perl, etc.

    =========================================================================

    William Lam

    VMware vExpert 2009,2010

    VMware scripts and resources at: http://www.virtuallyghetto.com/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • MAXL Script will not file for data laod error write.

    Sorry, Glenn here is the new thread. I re took place without semi colon after data 3 and the same error came without anything being written to the error file.

    I voluntarily removed a member of the original contour which is included in the loaded data, but still the error file is not written in. I tried to make the load manually but runs it in the background, error file is created on my local hard drive, but he's not writing it. Check the output and it is written in a directory located on the server. I think it's normal.

    It will not write to a local drive? I'll try specifying a task on the server to see if it spins here.

    Thank you

    Original post below.

    Hello

    I am also having this problem.
    I'll include my script below but will state some details before
    We are on Essbase 11.1.1.3
    I'm running the administration Console of my PC client that connects to the server in the script and I read that in this whole file error message won't get written. This documentation has been to v 9.1.3

    Here is my script (I've changed the names)
    Login ' user '' password' server ';

    create the application "Money1' as 'Money2.

    coil stderr to 'errorfile ';

    import the database 'Money1'.' Hand ' data
    text local data_file 'Money1_Data.txt '.
    using the server rules_file 'Data3 '.
    Error adding to 'dataload.err ';

    run the calculation 'ALL CALC'; on 'Money1'.' Hand ';

    disconnection;
    spool off;
    "exit";


    Here's the error output I get:

    line of code: error add to 'dataload.err ';
    The statement executed with warnings.
    (3) close syntax error ["$"]

    I don't see a sign of dollar anywhere in my code and the file of errors did not occur.

    Also error files get written too if the actines are running in the background?

    Thank you!
    Alex

    It 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 that you run through this) did weird things to MaxL. I avoid MaxL in EAS as much as possible (such as 100% of the time).

    NB - the datafilename and errorfilename and their drive letters are local to each time that you run this process through the MaxL shell. I don't know how it works when you run EAS - are local drives to your local session on the server of the EAS? Don't know. Leave EAS, buy TextPad (no I'm not the author of this beautiful product) and download syntax MaxL library and be happy. :)

    Kind regards

    Cameron Lackpour

    Published by: CL on October 7, 2010 07:12
    Put the MaxL in a block of code so that it can work correctly.

  • Run the PLSQL Script from Batch file

    I am trying to run a PL/SQL script in a batch file in sp1 Windows 7 Prof

    N ° 1) I wrote a simple PL/SQL script:

    --

    -The scope of variables

    --

    DECLARE

    v_sal number (7.2): = 50000;

    v_comm number (7.2): = v_sal *. 20;

    v_message varchar2 (100): = 'eligible for the commission;

    BEGIN

    declare

    v_sal number (7.2): = 50000;

    v_comm number (7.2): = 0;

    v_total_comp number (7.2): = v_sal + v_comm;

    Start

    v_message: = "not committed not" | v_message;

    dbms_output.put_line (' message of sub-block is ' | v_message);

    dbms_output.put_line (' subblock v_comm is ' | v_comm);

    end;

    v_message: = 'seller '. v_message;

    -dbms_output.put_line ('Main block v_total_comp' | v_total_comp); -Error: not visible in the main block

    dbms_output.put_line ('Main block v_comm' | v_comm);

    dbms_output.put_line (' main block message is ' | v_message);

    END;

    /

    Step 2) then I wrote a simple batch TstBatch.bat file

    sqlplus scott/tiger@orcl < PLSqlVarInputTst1.sql > > TstBatch.log

    Step 3) in the BACK of cmd, I tried to run TstBatch.bat

    C: > TstBatch.bat

    The log file tells me that I have connected to Oracle Database 11 g Enterprise Edition Release...

    Then a lot of SQL > SQL > SQL >... 26 times

    Procedue of PL/SQL completed successfully.

    Disconnected from Oracle database

    I also tried running the PLSQL script in SQLPlus:

    SQL: > @PLSqlVarInputTst1.sql

    Tell me the procedure completed successfully.

    QUESTION: So, where is the output of the PL/SQL script?

    Hello

    You must activate the output: Add the following line at the beginning of your PL/SQL script:

    SET SERVEROUT ON

    ...

  • Dynamic object and Batch files

    At the moment I am creating hundreds of icons in the same form and style. essentially, I made more than 100 icons and then realized that I wanted to add a high effecton of each of them. I already have the layer how I want and in fact a dynamic object. I was wondering if there is any combination of actions I can take to save and then apply as a batch operation for not having to manually correct each icon. The purpose of layer/chip would go to the exact same spot for each icon. Thanks for the ideas or help, you can provide.

    Using the file > Place to insert a file that contains the layer can be recorded in an Action, which should be able to be used with the file > PLC > then in batches.

  • Updates to Scripts and support files

    I'm trying to save a little time here. Can anyone confirm that support for WebHelp files have not changed names with the latest version? For example, files of wht, framesets, pages of the toolbar skin, etc. I adapted a good number of people by the Wiz.

    In addition, what is laterst version generate 'clean' code for Netscape, which means without error?

    Output file names WebHelp has not changed between RH X 5 and RH6. The code has been modified slightly.

    Harvey

  • Batch file for migration and closing the virtual computer

    Hello, currently my company uses visualization of network monitoring software that allows us to react when certain thresholds are exceeded. We seek to define a threshold for when our UPS reaches a certain point (i.e. a point where the battery is discharged) and we would like to run a script or batch file that stops certain s VM, migrate some s VM for a single host and stop some ESX hosts. We want to create as much time as possible for our virtual machines essential.  I came across this tool and wonder if someone has done something similar? I'm not very familiar with batch files, and I'm fighting to run second and third commands. My current batch file looks like this: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe - PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" - NoExit-command ' Connect-VIServer VIServer-user 'exampleusername'-'examplepassword' password ' I can't run additional commands after connection. As I said I'm not very good with batch files and I am new with this program.   If someone could point me in the right direction of the execution of the additional commands from a batch file after you have connected the script above, I would appreciate it a lot.
    I also would be interested in other ideas, if others have done similar things for the same purpose.
    Thank you very much!

    Instead of real orders of PS during the invocation of PowerShell, you might call a. Ps1 script that contains all of the instructions of PS.

    To call the script from a command file, you can do something like this

    C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" c:\your_script.ps1
    
  • How to kill the Batch files

    Hello

    I have three files batch for the aggregation.

    I used maxL in the batch file, and there are nearly 10 scripts of aggregation.

    Sometimes I have to kill the batch files... Can anyone please suggest how to kill the ball file while running.


    Thanks in advance.

    Depends on who do OS you run the script, you run the script and why you want to kill the script
    The script can be killed, but this does not mean that the current operation of essbase, you may need to use maxl /eas to try to kill the active session/query.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to export Unicode application data to aid ESSMSH maxl script?

    Hello

    I have a problem with Chinese characters in a Unicode application.

    I am trying to export data from a Unicode application using the maxl script syntax:
    EXPORT of DATABASE ' ' Sales. " To the SERVER HELP fichier_journal sales 'Backup' OF DATA_FILE 'D:\Backup.txt ';

    1. I have run this MaxL script using the MaxL editor in the Administration Console. It returns the data with members in the Chinese characters correctly.
    2. I call this MaxL script from a script of commands using ESSMSH 'D:\Backup.mxl '. It returns the data but members in Chinese character is displayed as? instead of Chinese characters.

    I need this MaxL script to run in a batch script and I need the text file must be loaded in a cube later. But because the Chinese character is displayed as?, it will return the error when loading data.
    How to solve this problem?

    Thanks and greetings

    Not that I have ever done this (English and Dutch use the same character, and that's the limit of my languages), but by the Tech Ref:

    MaxL Shell and Unicode
    MaxL Shell is in native mode to start in interactive mode.
    MaxL Shell is native mode when a script without a header byte UTF8 processing.
    MaxL Shell is in UTF8 mode when a script with the header bytes UTF8 processing.
    For more information, see the section of Oracle Essbase database administrator's Guide titled "Compatibility between different Versions of the Client and the server software."

    http://download.Oracle.com/docs/CD/E17236_01/EPM.1112/esb_tech_ref/maxl_utf8shell.html

    See the SER60 here:
    http://download.Oracle.com/docs/CD/E17236_01/EPM.1112/esb_dbag/duniover.html

    And then perform a search in the section for this:

    If you use the Services Administration Console or another tool to create a MaxL script and save it as UTF-8 and then run the MaxL Shell script, MaxL Shell assumes the role of a client in Unicode mode. You can use this approach, for example, to update the contours across generations of dimension. When you create the script, don't forget to include the signing of UTF-8. See indicators of encoding.

    Check out the kaleidoscope of Glenn Schwartzberg since 2009 WORLD tour. I think this is the presentation I recommend the more - he has covered a lot of valuable land, including using the unicode utility. It is available at the section www.odtug.com technology resources. Look under Essbase/Hypeprion, then search for his name.

    You will have to join if you are not already a member. Associate membership is free and will allow you to download the presentation.

    Kind regards

    Cameron Lackpour

    P.S. If find you this point, could you post your solution for the edification of everyone?

  • Launch of Maxl Scripts

    Hello all-

    My users running Maxl script by looging remotely on the server. I want to stop the user to connect the area and ask them to run the script from their machine. The maxl script calls a security file that has the password to sign in Essbase. How can I achieve this? Is it possible I can do user run the script of their machine without having access to the security file that has the user name and password for the administrator account.

    Please advise!

    Thank you!

    It would be possible to remove the requirement for the security file if you encrypt the username your maxl script-based.
    You should always put the name of the server in your maxl script and I don't know how your environment variables are used.

    Or you can always have the security script and to remove passwords username which must be taken in charge with the encrypted file maxl.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Passage of the maxl script batch file value.

    Hi gurus,

    I want the user to select the scenario he wants to clear the data for a specific intersection in a cube of ASO for running batch file. Files and newspapers is as below

    Batch file:

    ECHO please select a scenario:

    ECHO A. actuals

    B. Budget echo

    choice/m C:AB '-> > enter a letter for the scenario you want to delete: "%1 '"

    IF ERRORLEVEL is 1 Set ScenarioName = law

    IF ERRORLEVEL == 2 Set ScenarioName = bud

    E:\Oracle\Middleware\user_projects\epmsystem3\EssbaseServer\essbaseserver1\bin\startMaxl.bat "C:\Users\TCleardata2.mxl" % ScenarioName %

    MaxL file:

    spool to 'C:\Users\Cleardatalog.txt ';

    / * Value Variables * /.

    Set vScenarioName = $1;

    Echo script: "$vScenarioName";

    connection username pwd on "IP:1423 Server";

    / * Erase data * /.

    ALTER database abc.abc clear data in the region ' {("$1", Final, FY15, P2, ACC_1011640)}' physical;

    echo * clear full *;

    disconnection;

    spool off;

    Log file:

    Scenario: law

    MAXL > connection username pwd on "IP:1423 Server";

    OK/INFO - 1051034 - user [username@pqr] connection.

    OK/INFO - 1241001 - connected to Essbase.

    *****************************************************************************

    MAXL > alter database abc.abc clear data in the region ' {("$1", Final, FY15, P2, ACC_1011640)}' physical;

    ERROR - 1260052 - syntax error in a MDX query on line 1 to token entry ' "$1".

    *****************************************************************************

    Full Claire *.

    MAXL > disconnect;

    Username is disconnected

    ___________________________________________________________________________________-

    in the MAXL if I write: law instead of ' $1 ' it works fine, but I can't take the user input, it is question of syntax?

    Below the command works fine:
    ALTER database abc.abc clear data in the region '{(law, Final, FY15, P2, ACC_1011640)}' physical;

    Can someone please let me know what I'm doing wrong here?

    Thank you

    RN

    I don't think that (alone) allows in this case - the problem is that the single quotes around the specification of the whole region removes extension variable (see Variables).

    Double quotes lose about $1, but also replace the single quotes around the specification of the entire region with quotes, i.e.:

    ALTER database abc.abc clear data in the region '{($1, Final, FY15, ACC_1011640, P2)}' physical;

  • Batch file to open all files in a folder, one by one and run a script.

    I'm looking for a batch file, to run a script on each file file in the folder and open all files in a folder in the path defined and close the file. How is it possible

    Anthony,

    I would have you post here for assistance more.

    http://social.technet.Microsoft.com/forums/en-us/home?category=windowsxpitpro

    We know if that helps.

  • Call the batch file and not the shell script using measures of the event

    Can I use EVENTACTIONS at the door of gold like

    eventactions (SHELL, /path-to-batch-file/test1.bat)

    will this work? I am on a windows machine, so I need to run a batch file and not a shell script

    In GGSCI, you can shell OUT to the BONE and call a command/executable file.

    For example on Windows:

    GGSCI (WIN2003) 2 > shell dir

    Volume in drive C has no label.

    Volume serial number is 8CCC-9E58

    Directory of C:\ggs

    18/08/2012 07:23

    .

    18/08/2012 07:23

    ...

    2010-10-15 06:37 bcpfmt.tpl 426

    2010-10-15 06:37 bcrypt.txt 1 725

    22/04/2011 03:41 2 560 category.dll

    05/11/2011 10:43

    cfg

    2010-10-15 07:15 739 chkpt_ora_create.sql

    ...

    What were the results when you tried this in an EVENTACTIONS clause?

Maybe you are looking for

  • Qosimio G20: Why don't then I update graphics driver?

    Anyone know why it is not possible for me to install one of the latest graphics drivers from nvidia? An error message-"the nvidia software cannot find all the drivers that are compatible with your hardware. Any help would be appreciated. Cheers in ad

  • Buy USB recovery failed.

    I have a quad of 15 t-j000 touchsmart envy with a swipe of the finger. Because it appears that hp cannot provide me a recovery USB that works, I think the purchase of victory pro 8.1 and download of various factors such as the sweep of the screen and

  • HP Deskjet Ink Advantage 4645: Cannot save as document Scan

    After that I scanned a document, the following message appears: "The HP scanning application could not save the file to the specified location. I don't know where he is trying to save in, and why I get the message?  I think I'd have an option as to t

  • Is it possible to upgrade the GPU in this laptop HP DV7 - 2043cl

    I searched on the net, and I'm mixed responses.  I just got a laptop additional thanks to an agreement of craigslist and I was wondering what, if any update I could do for her. I did a little research and if I could upgrade it seems I might be able t

  • Cannot scan with cnw 1355 Dell MFP.

    I have IT supported by a University.  We have recently updated on new computers and now I am not able to scan from the printer.  Here is some info on the computers of OLD & NEW: On both old & new computers we use Win7 64 bit. The printer is a Dell 13