Maxl script in unix

Hi Experts,
how to run the maxl script in linux platform in silent mode.I am invoking the maxl script through shell script. If I run the script linux screen shows all the dimension load status for all dimension.
Thanks in advance.

That's because STDOUT (which you have redirected to dev/null with ">") and STDERR are separate streams. The error / warning messages are on STDERR.
Try redirecting with..>/dev/null 2>&1I'm not a shell scripting expert by any means; suggest Googling 'redirect STDOUT STDERR' to understand what's actually going on.
EDIT: Since the OP has marked this post 'Correct' (Robert really had the complete correct answer first!) I have corrected the syntax to avoid confusion for anyone who gets here in future via search.
Edited by: TimG on Oct 17, 2012 5:55 AM

Similar Messages

  • Essbase Maxl Issue - In UNIX

    Hi Everyone,
    We are trying to build dimension using maxl script in unix box.
    Facing syntax and unexpected error. Followed the steps as below.
    1.In Putty, navigated to bin folder and invoked maxl script using ./startMaxl.sh command
    2.logged in using  the command login 'username' 'password' on 'essbaseservername';
    3.Executed the import database command to build dimension having sql as source as below
       import database 'xxx'.'xxx' dimensions connect as 'bis_read' identified by 'bis_read' using server rules_file 'DimChn' on error write to '/home/essproj/Maintenance/Automation/Logs/CTO/Build/Channel1.txt'
    4.Executed the import database command to build dimension having datafile as source as below
       import database 'xxx'.'xxx' dimensions from data_file '/home/essproj/Maintenance/Automation/Source Files/CTO/Measures.txt' using server rules_file 'DimMeas' on error write to             '/home/essproj/Maintenance/Automation/Logs/CTO/Build/Measures_log.txt'
    Throwing the error
    ERROR - 1242021 - (1) Syntax error near ['/'].
    as well as
    ERROR - 1241101 - Unexpected Essbase error 1054036.
    5. We even tried to save the .mxl file in the utf-8 formate and tried to execute the .mxl file at that time we are getting the error as "Segment Fault" but we are using the super user credentials to do this activity.
    Please help on this

    Hi,
    Please using '\' instead of '/'. You can use spool in your mxl script to capture the error better.
    spool on to 'c:\dimbuild.log';
    MAXL Statements & commands;
    import database 'xxx'.'xxx' dimensions from data_file '\home\essproj\Maintenance\Automation\Source Files\CTO\Measures.txt' using server rules_file DimMeas on error write to             '\home\essproj\Maintenance\Automation\Logs\CTO\Build\Measures.log.txt';
    spool off;
    logout;
    exit;
    Also label's also would do the magic..!! Let us know us how it goes..!!
    Thanks
    Amith

  • UNIX Shell Script - Maxl - executing 4 Maxl script at the same time

    Hi,
    I wrote a UNIX shell script that basically call 4 maxl script to execute at once. But it seem to executing 2 maxl and then it goes to the last script. So, script 4a,4b,4c, & 4d should execute all at the same time. But for some reason at random only two script is being executed. And then it would go to script 5. Anybody have any answer to why it's doing this? Or is it something i'm doing it is incorrect help please?
    I'm running essbase 11.1.2
    Here is my script:
    #!/bin/sh
    # Maxl script to run
    export MAXL_SCRIPT_1=/hyperion/..../script1.maxl
    export MAXL_SCRIPT_2=/hyperion/..../script2.maxl
    export MAXL_SCRIPT_3=/hyperion/..../script3.maxl
    export MAXL_SCRIPT_4a=/hyperion/..../script4a.maxl
    export MAXL_SCRIPT_4b=/hyperion/..../script4b.maxl
    export MAXL_SCRIPT_4c=/hyperion/..../script4c.maxl
    export MAXL_SCRIPT_4d=/hyperion/..../script4d.maxl
    export MAXL_SCRIPT_5=/hyperion/..../script5.maxl
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_1 "
    wait
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_2 "
    wait
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_3 "
    wait
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4a " &
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4b " &
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4c " &
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4d " &
    wait
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_5 "
    echo Done.
    Thanks,
    Mark

    Thanks!
    I just noticed that the problem was due to something *within my application*.
    I explain:
    i built an application and I want it to be activated by my script.
    I have another script running, but this is not a problem as I discovered later...
    The problem is indeed that my script activates my application, but even when my application is opened, so it succeded, it stays hanged.
    I found that the same thing does not happen with regulare applications, such as Safari or iTunes, so i narrowed down the probglem to my application...
    Is there something i should do to it?
    I checked the "scriptable" checkbox inside my application plist, but the result is still the same...

  • MAXL Script error in UNIX

    Hi All,
    i have a maxl script to export the level 0 data and also a shell script with command "*essmsh maxlscriptname.mxl*" in it, the version that i am working on is essbase 11.1.2 and the platform is in unix.
    I have seen that, for the maxl script to work in version 11 we have to use the command "*startEssmsh.sh*" so that it sets all the variables and then runs the required script.
    The problem is, i dont have startEssmsh.sh in my \bin directory and even if i change my shell script to "*startEssmsh.sh maxlscriptname.mxl*" its not working, it says that startEssmsh.sh not found.
    Kindly let me know on how to run the mxl script in unix with no startEssmsh.sh file present \bin directory. Are there any manual steps to set up the variables and if yes, what are they.
    Thanks,
    Amogh

    The script you are looking for is:
    <MIDDLEWAREHOME>/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin/startMaxl.sh
    In UNIX you will need to use the full path to startMaxl.sh unless you have <MIDDLEWAREHOME>/user_projects/epmsystem1/EssbaseServer/essbaseserver1/bin in your PATH statement.
    Regards,
    John A. Booth
    http://www.metavero.com

  • Looping in Maxl Script - To load multiple files

    Hi,
    I am using Essbase 11.1.2 on UNIX.
    I have maxl script which will load 20 to 30 extraction file. Number is inconsistent. Extraction files will grow each month. Extraction files are with same name with the suffix _1,_2...(2 Gb thing). My previous script was hard coded to load file by file to load up to 50 files. I am trying to remove these hard coded lines, and try to loop the “load” statement. I have tried several ways using while loop in shell to call maxl /msh , but no luck. Any ideas?
    Thanks

    A very similar question was asked recently (but for Windows): Re: Maxl to import datafolders
    What have you tried? Maybe someone here can show you what's wrong with your script.
    The approach I usually take with this type of problem is to write a script that dynamically builds one single MaxL script with the appropriate number of files, rather than calling MaxL multiple times.
    I am generally too ashamed to share my Unix scripts, but at it's most basic, non-error-trapped, probably-inadvisable-and-full-of-holes-for-all-kinds-of-reasons, you could include something like this to build your load script:
    ls filename*.txt | awk {'print "import database etc... "$1" ...on error etc;"'} > scriptname.mshSince you can nest MaxL scripts, you can then reference scriptname.msh from a static 'master' script which handles login / spool on / spool off / logout as appropriate. See http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_tech_ref/maxl_commands_nesting.html or Cameron's 2009 K'scope presentation: http://odtug.com/apex/f?p=500:575:526121996615242::NO::P575_CONTENT_ID:4605

  • 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 script STATUS

    Hi guys..
    Is there a way to check the status of the maxl script executed.
    The scenario I am talking about is like this:
    A maxl script is being called from a unix script. Is there a way to check if the status of the maxl file executed is Success or Failure.
    I am using startmaxl.sh to execute the maxl file. So if there is an error the startmaxl.sh should return 1/Failure. right?
    Correct me if I am wrong.

    It's worth having a read of Cameron's post of exit codes and error handling in maxl - http://camerons-blog-for-essbase-hackers.blogspot.com/2011/06/no-exit-but-not-in-maxl_9756.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Maxl/esscmds on unix : hiccups

    im kinda doubtful if the environment variables have to be set in the script if the path is already set in the .profile in essbase.should i set the server ,user and password for eg :server =xyzexport server etc i also feel i have a problem with setting the user as changes are not reflecting in the root.also what is the best way to create a maxl or an esscmd script in unix for scheduling.

    This is an excerpt from a script to enable logins after a nightly archive process:############################################################# Backup the old enable log file and start a new log file. #############################################################mv ${LOG_PATH}/${DB_NAME}_enable.log ${LOG_PATH}/${DB_NAME}_enable.log.bak >${LOG_PATH}/${DB_NAME}_enable.logESSCMD << end_esscmdOUTPUT 1 "${LOG_PATH}/${DB_NAME}_enable.log"IFERROR "quit_scr";LOGIN "${SERVER}" "${USER_ID}" "${USER_PWD}";IFERROR "quit_scr";ENABLELOGIN "${APP_NAME}";:quit_screxit;end_esscmd################################################### Log a message if the script fails at any point ###################################################$COMMON_SCRIPT_PATH/chkstat.sh ${LOG_PATH}/${APP_NAME}_enable.logif [ $? != 0 ]then(and so on)##################################################many of the variables are set in the user's profile as part of the connection, others are set in other places of the script. Because it's Unix, the script doesn't have to have any specific extension, as long as it's been marked as an executable. The syntax here shows how the inline code allows the script to be interpreted and fed to the esscmd processor without creating a separate file.As for scheduling, chron works, other things may work better. That's between you and your support department to work out.Good Luck,-Doug

  • Essbase Reports - MAXL Scripts

    <p>I can not find the MAXL script command to execute an EssbaseReport.</p><p> </p><p>In Esscmd, it is RunRept. Any help would be appreciated.</p><p> </p><p>Jamie</p>

    Just an example based on the Sample:Basic DB .... (this is for Windows, I guess the syntax for UNIX is slightly different, refer DBAG for exact details).<BR><BR>export database sample.basic using report_file 'Essbase\\App\\Sample\\Basic\\Bottom.rep' to data_file 'D:\\Essbase\\Reports\TestReport.rpt';<BR>

  • Create Dynamic Maxl scripts

    Hi,
    When we need to create dynamic maxl scripts without using a batch commands or unix commands?

    Hi Nila,
    I aggree with Daniel: you have to use a little bit more than MAXL to automate that. I dont know if you understand me correctly: You only need to create one shell script, 1st part: call maxl to export, 2nd part to manipulate the output, 3rd part to import the manipulated output.What I would like to say: You dont have to manipulate it manually. And after the creation the shell script can be scheduled to run every month, if you like... If you generally wouldnt like to use shell scripts you have a problem - I am not a MAXL guru but I would say it is not possible.
    Kind regards
    André

  • How to delete the members in one dimension use the maxl script

    i have question that i want to delete the members in one dimension useing the maxl script, but i do not know how to do it. can the maxl delete the members in one dimension? if can, please provide an sample script, thank you so mcuh.

    MaxL does not have commands to alter an outline directly, except the reset command which can delete all dimensions but not members selectively. The best you could do would be to run a rules file (import dimensions) using a file that contains the members you want to keepload rule for the dimension. As typical the warning is to test this first before you do it on a production database

  • 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

  • ODI fails when running MAXL scripts

    HI,
    We have a problem with ODI where when a scenario has a maxl script as a step the scenario fails.
    This is not a problem in our production environment but it is present in our DEV and TEST environments. We believe it may be a problem with the cloning process from PROD.
    Has anyone had this issue previously or can provide some helpful direction.
    Regards
    Luke
    ODI 10.1.3.5

    What is the error you are getting at the failure point?

  • 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.

Maybe you are looking for

  • Power Mac G5 Dual 2.5 freezes up, Power Mac G5 Dual 2.5 freezes up

    Hello I inherited a Dual 2.5 PPC Power Mac G5 from my sister. She was having problems with it suddenly freezing up. She replaced the hard drive but that didn't fix it, and sicne she had a newer Macbook Pro she gave up on it. When I got it I replaced

  • The printer page size setting is not working in Photoshop 5.1 with Xerox printer

    I am attempting to print an output size larger than 8.5 x 11 and Photoshop will not change the size even though the printer setting is now at the larger size.  Illustrator and other programs will print but but Photoshop fails.  This is an issue in bo

  • Safari crashes or will not complete loading - just updated to 3.2.1

    Hey there, I hope this post gives enough information for a quick answer. I just did a software update to 3.2.1. Rebooted after the install and since then I haven't been able to use Safari fully - initial start wouldn't load my tabs/windows from previ

  • Keynote - updated 6.2.2

    Hello I am having a nightmare with Apple. I have been clicking on it's 'community support' page, which gives you a message without any details that says 'are you back with the same problem'. It doesn't matter whether you click yes or no (or can't rem

  • Problem with my ipod touch jack

    I have a problem with my ipod touch jack. When I listen to music (using non aple headphones and the headphones it came with)it doesn't sound as good as my mp4 player so I purchased  an adapter and it still doesn't work what can I do?