Tuesday, August 26, 2008

Working with Essbase Files

image Working on a project I found myself writing a bunch of MaxL scripts.  So for this I started using Administrative Service and as the scripts got bigger I realized I needed to start using my favorite text editor, TextPad.   If you don’t have it already it is really a fine text editor and I have been using it for years, but working with MaxL I was missing the syntax highlighting and function lists that I had in Administrative Services.  I remembered that TextPad has features that allow you to define things like highlighting and function lists, you just need to build the definition files for this stuff.  Here are the steps I took to get my MaxL files working the way I wanted.

  • Set up TextPad to run MaxL scripts and capture the output.
    1. Open TextPad.
    2. Select Configure | Preferences.
    3. Select the ‘Tools’ item.
    4. On the screen click the ‘Add’ button and choose ‘Program’.image
    5. Browse to the location of the MaxL executable and select it.  (useally - %HYPERION_HOME%\products\Essbase\EssbaseClient\bin\essmsh.exe).
    6. image

    7. Once in the tools list you can select it and make edits if needed.
    8. Now you can run MaxL scripts in TextPad.  Select Tools | External Tools and select the item you want to run.
    9. Repeat for things like Esscmd and anything else you might want to run from TextPad.
  • Set up Syntax Highlighting
    1. Open TextPad.
    2. Select Configure | New Document Class.
    3. Type the name you want for the new document type (MaxL or Essbase MaxL).image
    4. Select the class members or file extensions that will identify the file (*.msh, *.mxl).image
    5. Enable syntax highlighting and select the file to be used.  The files need to be located in the TextPad ‘samples’ directory. (C:\Program Files\TextPad 5\Samples)  Files are posted below.image
    6. Click ‘Next’ and then ‘Finish’.
    7. You now have a new document class that understands syntax highlighting; repeat this for other file types like MDX, Essbase Calculation Scripts, Etc.
  • Set up clip Libraries.
    1. Make sure the clip library files are located in the TextPad ‘samples’ directory. (C:\Program Files\TextPad 5\Samples) Files are posted below.
    2. Open TextPad.
    3. Select View | Clip Library.
    4. Select the clip library you want.image

Now TextPad it set up to handle all the Essbase Script development you would ever want.  You can also set up things like ‘File Name Filters’ and ‘Associated Files’ to make things even easier.

Thanks to Dave Roberts for providing the initial TextPad files used for syntax highlighting and clip libraries.  Please note the some of the files need updating for new features in Essbase but all are pretty close…

15 comments:

Robert said...

Awesome content. I also use TextPad and love the Tools>Run... feature. You can use this dialog box to run your .msh MaxL files and capture the output into TextPad.

The settings are:
Command: C:\Hyperion\AnalyticServices\bin\essmsh.exe
Parameters: xxx.msh
Initial Folder: C:\Hyperion\AnalyticServices\bin

I check the DOS Command and Caputure Output boxes to see the messages coming back from the server.

Matt Milella said...

Yea textpad rocks! Thanks for the tip on running Maxl scripts...

Gary Crisci, Oracle Ace said...

Matt,

I'm having some trouble getting this to work and was wondering if you ever saw this error message.

-----------------------------------
Analytic Services MaxL Shell - Release 7.1.6 (ESB7160B096)
(c) Copyright 2000-2006 Hyperion Solutions Corporation.
All rights reserved.

MAXL>
essmsh error: Statement exceeds maximum possible size

MAXL>
Interrupted!

Tool completed with exit code -1073741510
-----------------------------------

I get the same error if I run with v9.3.1 maxl. I'm using Textpad 4.5. I thought it might be the version of Textpad so I went and installed v 5.2, but still got the same error.
Any thoughts on a setting that might resolve this?
I tried googling the error message, but couldn't find anything relevant.

Thanks.

Matt Milella said...

Seems like a MaxL issue not a Textpad issue. How big is the statement you are sending to MaxL. I think there are some limits on the size of the statement... Have you tried the statement outside of textpad?

Gary Crisci, Oracle Ace said...

I'm not actually running a statement. That's the error I get right off the bat after I add essmsh as a tool and then go to tools and click on essmsh.

I also thought it looked like something with Maxl. Agains its weird becasue I ran on two different machines, with different versions of MaxL 7.1.6 and 9.3.1.

thanks for the quick response.

Matt Milella said...

I just tried it with a blank document and I get the same error. It does work when you have script in the document... So I would just ignore that.

Gary Crisci, Oracle Ace said...

Ok, so I see how this is working now. If I type my MaxL statements before I run essmsh it executes without error, If I just try to run essmsh in a blank doc I get the error. I thought I could just run the essmsh and then use MaxL interactively in textpad, as an alternative to the cmd window. This looks pretty cool now. Thanks again for the quick responses. BTW, awesome blog!

Matt Milella said...

Glad to hear it works for you and thanks! Happy to see people use the stuff on the blog.

Beau said...

Has anyone attempted to color code matching parenthesis for editing purposes?

Matt Milella said...

No I have not looked at this I am not even sure you can do this is text pad. If someone know I would love to hear...

siva said...

Hi
I have one doubt in Essbase,
What is the Distruct Recovery(DR) in Essbase?
and also once Application is created where is the log files are stored in Essbase Server? give me the answers as early as possible?

Matt Milella said...

I do not know what DR is. Log are stored in $HYPERION_HOME/logs for Essbase 11.x older versions will have logs in the application directory $ARBORPATH/app.

chandra said...

did any one working essbase on vista

westamastaflash said...

Very cool, thanks. I would love to see something for Notepad++ too (it seems a bit more robust than textpad, and its free!)

I've got basic syntax highlighting and code foldng down but some of the more complex structures can make it a bit confused.

Matt Milella said...

This is the first I have heard of notepad++. I will have to check it out, it is always nice to have a free option. Plus it has been a while for textpad updates and I wonder if it is getting anymore development attention?