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é
Similar Messages
-
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, JacobIt'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 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! -
I am researching options for the company I work for to take it's invoicing system paperless and I need to know if I can create a custom-scripted dynamic stamp in Acrobat Standard or is that possible only in Acrobat Pro?
You can create a custom dynamic stamp in Std. and Pro. and you can use the dynamic stamp in Reader as well. Here is an infographic on Creating a Custom Dynamic Stamp in Acrobat XI.
-
Sap script creating dynamic box problem
Hi all,
I am unable to create dynamic box in sap script.
Because the printing lines in the main window changing from one customer to another customer.
So could you please guide me how to create a dynamic box in sap script and also how to know the printing line nunber in main window.
Advance thanks for your suggestion
Regards,
Sudhakar.In script form u can write following code
/: DEFINE &MY_XPOS& = ' '
/: DEFINE &MY_YPOS& = ' '
/: DEFINE &MY_HEIGHT& = ' '
/: DEFINE &MY_WIDTH& = ' '
/: PERFORM GET_BOX_SIZE IN PROGRAM Z_MY_PROG
/: CHANGING &MY_XPOS&
/: CHANGING &MY_YPOS&
/: CHANGING &MY_HEIGHT&
/: CHANGING &MY_WIDTH&
/: BOX XPOS '&MY_XPOS' MM YPOS '&MY_YPOS' MM HEIGHT '&MY_HEIGHT' MM WIDTH '&MY_WIDTH' MM INTENSITY 10 FRAME 0 TW
In report u can write following code
Form Get_Box_Size TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
Loop at Out_Par.
Case Out_Par-Name.
When 'MY_XPOS'.
Out_Par-Value = 100.
When 'MY_YPOS'.
Out_Par-Value = 57.
When 'MY_HEIGHT'.
Out_Par-Value = 300.
When 'MY_WIDTH'.
Out_Par-Value = 'Does it matter?'.
EndCase.
Modify Out_Par.
EndLoop.
EndForm. -
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 - Create Partition
In the maxl script below I want to map 2003 Actuals to void (something that the partition wizard does "automatically"). The '2003 Actuals' is present in the target.<BR><BR>However I have been unable to find the correct syntax. Below lists a few examples of what I have tried.<BR><BR>mapped globally (null) to ('2003 Actuals') <BR>mapped globally (void) to ('2003 Actuals') <BR>mapped globally () to ('2003 Actuals') <BR>mapped globally to ('2003 Actuals') <BR><BR>Any help would be gratefully received.<BR><BR>
So, in one cube you have 2003 actuals and in the other you don't. Why do yo uwant to try to map the 2003 Actuals to a void? Try mapped globally (scenarios) to (scenarios)
-
Can maxl script be created using WinVi
Can WinVI be used to create a Maxl which is supposed to run on Linux?
I have used notepad to create the maxl files and moved them to linux.. i have recieved an error
essmsh error: Parse error near
hence I used WinVi coz I think the incompatability between Unix and Windows caused this error..
however I want to know which is the best tool to create a maxl file which has to be run on Linux/Unix?
Thanks in advanceHi Jeff,
First of all, don't use Notepad on anything you will be sending to a *nix envoronment.
The problem is it, and several other windows text programs add 0D and 0A to the end of each line. This is a carraige return followed by a line feed. These trace their roots to mechanical typwriters where a carraige return and line feed could be two separate things.
In linux, text files ONLY use line feeds. The carraige returns that windows puts in causes nothing but headaches in the rest of the computing world.
There are a number of ways to fix this. Here is a bit of PERL that will get the job done:
perl -p -e 's/\r$//' < wintextfile.txt > unixtextfile.txt Or if you like awk:
awk '{ sub("\r$", ""); print }' wintextfile.txt > unixtextfile.txtor use the following command in VIset ff=unixAny of these will fix your problem.
Regards,
Robb Salzmann -
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?
ThanksA 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 -
Create dynamic directory name from form field on Sharepoint
Trying to save pdf file to sharepoint site using URL; but need to create directory (initially) and filename dynamically. After directory created addtn'l files may populate dir, so need to check for directory exists; if so just copy files to dir based on field name. I'm able to save files to hard-coded location only, based on below.
How to check and/or create dynamic directory base don field name?
// folder level JavaScript to allow access to the identity object properties
trustedIdentity = app.trustedFunction( function (sProperty)
var iProperty = "";
app.beginPriv();
iProperty = identity[sProperty];
app.endPriv();
return iProperty;
// folder level JavaScript to allow Save As population of file name
mySaveAs = app.trustPropagatorFunction(function(myForm, path)
app.beginPriv();
var myForm = event.target;
return rtn = myForm.saveAs(path);
app.endPriv();
myTrustFunct = app.trustedFunction(function(myForm, path)
app.beginPriv();
var vTest1 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test1[0]").rawValue.toString();
var vTest2 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test2[0]").rawValue.toString();
var vTest3 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test3[0]").rawValue.toString();
var vTest4 = event.target.xfa.resolveNode("topmostSubform[0].Page1[0].Test4[0]").rawValue.toString();
var vpdf_url=location.href;location.href='http://mysite2010.com/documents
var vPath = "/vpdf_url/" + vTest1 + Test2 + vTest3 + " .pdf";
//console.println("vPath: " + vPath);
var retn = mySaveAs(myForm, vPath);
app.endPriv();
return retn;Acrobat/Reader cannot create a directory. The directory needs to exist before Acrobat/Reader can save a PDF file to that directory.
You could create a plug-in and use that plug-in to create the directory. The plug-in should also be able to determine if the directory exists or not.
SharePoint can be tricky because it is not like most web sites. There is a special dash board that helps manage the different parts of SharePoint like list, folders, web parts, documents, etc so you may need to be aware of these features and adjust for them.
For folder level functions, I would not use any LiveCycle JavaScript variations. The folder level scripts are shared and accessible by Acrobat forms. -
How to create dynamic calc account in multi-plan type application
Hi expert,
I have a planning application with 3 plan types.
I created a calculation script which fixed on accounts in plan type 1 only and the calculation suppose to calculate a "dynamiccalc" account with a member formula attached. Everytime I run the script, it takes very long time and I found there are sessions at the back of essbase with "Process local xref/xwrite request" request to other plan types.
It does not has this kind of session if I change the account to "store".
Would like to check, is it possible to create a dynamic calc account to calculate for only 1 plan type in a multi-plan type application? Is there any special setting that I need to do to enable this? I already selected source plan type as Plan type 1 for my dynamic calc account. Please help!
Many thanks!!
My HP application is on version 11.1.2.1.Hi Jake,
Thanks for pointing out the check box. Overlooked it and the checkbox was not unchecked, even I only wanted the account to exist in 1 of the plan type.
However, after I unchecked and refresh now, when I run the calc script, it still trigger process at the back to the other 2 plan types with "Process local xref/xwrite request" request. What else could I have missed?
I already added the "HSP_Nolink" UDA to all accounts in plan type 2 and plan type 3 and confirmed that there's no account with "Xref" member formula, I really don't know why it is trying to process local xref request. Can anyone help??
Many thanks!!! -
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. -
Any Maxl Script to Export and import of Partition
Hi All,
Is there any maxl or Esscmd command which will do an Export or an import of the partition.
Regards,
Krishna.Hi Krishna,
here ,there are 2 things.
Firstly, creation of partition( which is possible through MAXL scripts).Once the partition is made, an XML is created(which is what garycris was mentioning in his post).
Goto any application -> database -> partitions ->right click here , you see "import partition",and the file nature is of XML.When you look at this window , you will undestand .I am not sure of the same functinoality in MAXL.
Hope this info helps
Sandeep Reddy Enti
HCC -
Script to export Security file using maxl script
can anyone provide me the Script to export Security file using maxl script.It should create a log file and a batch file should also be there to schedule the Maxl script.Please help me with this
Hi,
You can use something like
[b]login admin password on localhost;
[b]spool on to 'c:\temp\log.txt';
[b]export security_file to data_file C:\temp\sec_file.txt;
[b]spool off;
[b]logout;
Then you can have a batch file that just calls the maxl script
essmsh name_of_maxl_script.mxl
The batch script can then be scheduled.
Cheers
John
http://john-goodwin.blogspot.com/ -
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
Maybe you are looking for
-
How to display my iPad 2 on my macbook air's screen WITHOUT using AirPlay?
I want to know how to do this using a "wired" solution. I understand I can achieve this via aps that access AirPlay but it can be unreliable with spotty wifi connections.
-
Error while creating Org Structure
Hi, Im creating an Organization structure,where 2 Org units/positions report to 1 top Org Unit/Position.When i create the relation between one Org unit and sub Org Unit it is saved correctly.But if im trying to create a relation between another sub O
-
Issue in Reversing a FI Document using BAPI_ACC_DOCUMENT_REV_CHECK
Hi Experts! When I try to reverse a FI document with document no (9100000451) in company code 005 in my code by calling the BAPI BAPI_ACC_DOCUMENT_REV_CHECK and BAPI_ACC_DOCUMENT_REV_POST, its gives an error saying 'Reversal in component General Led
-
Linking Session Model with query model
Hi All, How do we implement a basic Session Model? Can we use a Session Model similar to Query Model and bind all the columns/attributes with that of ViewBean's ? Does Studio support that. We have a requirement wherein we need to manipulate the field
-
WIP Job Status Control at User Level
Hi All, I need to give the user just the control of releasing the Job(Work Orders). Right now he has got OnHold/Cancelled also. What i have observed is after certain operations he has cancelled the job and it has incurred the cost. I looked at the lo