* With examples (script), the script calculation commands *.

Dear Guru,

I'm new recruit in Essbase.

I am easily understand Essbase calculation scripts except. Recently, I've studied Essbase Ser60 Pdf. But I need scripts of calculation with examples (with scenario) to understand easily.

any suggestions would be very helpful.

Thanks in advance.

Do a search through this forum and the Essbase54, you see a lot of examples, or just start to scroll back posts.

Also begin to develop some tests on your own, the best way to learn is to try.

Tags: Business Intelligence

Similar Questions

  • Strange events with examples from the book to Tom Kyte. 10 XE

    '


    Hi all

    I was twiddling my thumbs and decided to revisit some of the fundamentals of Oracle.

    Book of Tom Kyte - Effective Oracle of design. Examples on p. 141-142 (to do with
    bind variables). Typed in the example and got a reaction very strange system.

    It consists of a 'DEMO_141_PKG' package with 1 procedure 'parse_bind_execute_close '.
    that is called by the QUICKFIX142 procedure. The system then proceeds to go mental.

    If someone could explain to me what is happening, I would be grateful. I'm under 10 XE on
    Ubuntu Linux.


    On the execution of the code (below), I get this in the "Run" window of SQLDeveloper.
    Connecting to the database demo.
    ORA-01000: maximum open cursors exceeded
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 884
    ORA-06512: at "SYS.DBMS_SQL", line 9
    ORA-06512: at "DEMO.DEMO_141_PKG", line 17
    ORA-06512: at "DEMO.QUICKFIX142", line 8
    ORA-06512: at line 2
    And the window just a continuous record of SQLDevloper watch
    flow of the text below - I have to kill the sessions as a SYS of
    within Oracle - the process Terminate of SQLDeveloper
    fails to kill this runaway process.

    Record output
    SEVERE     2474100     1     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
    SEVERE     2474099     1     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
    SEVERE     2474098     0     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
    SEVERE     2474097     0     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
    SEVERE     2474096     1     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
    
    <Millions of lines snipped - it just keeps going>
    Now, the code is here for those who would like to help me get to the bottom of this phenomenon.

    create or replace
    PACKAGE DEMO_141_PKG AS 
    
    procedure parse_bind_execute_close(p_input in varchar2);
    
    END DEMO_141_PKG;
    
    create or replace
    PACKAGE BODY DEMO_141_PKG AS
      g_first_time boolean := TRUE;
      g_cursor number;
    
    procedure parse_bind_execute_close(p_input in varchar2) 
    AS
      l_cursor number;
      l_output varchar2(4000);
      l_status number;
    BEGIN
      l_cursor := dbms_sql.open_cursor;
      dbms_sql.parse(l_cursor, 'SELECT * FROM Dual WHERE Dummy = :x', dbms_sql.native);
      dbms_sql.bind_variable(l_cursor, ':x', p_input);
      dbms_sql.define_column(l_cursor, 1, l_output, 4000);
      l_status := dbms_sql.execute(l_cursor);
      if(dbms_sql.fetch_rows(l_cursor) <= 0)
      then
        l_output := null;
      else
        dbms_sql.column_value(l_cursor, 1, l_output);
      end if;
    END parse_bind_execute_close;
    END DEMO_141_PKG;
    and the above is called here

    create or replace
    PROCEDURE QUICKFIX142 AS 
    BEGIN
    
     -- demo.runstats_pkg.rs_start; // Don't worry about  runstats - it's a Tom Kyte package for 
    -- timings and measuring contention.
      execute immediate 'alter session set session_cached_cursors = 0';
      for i in 1..1000
      loop
        DEMO_141_PKG.parse_bind_execute_close('Y');
      end loop;
     -- runstats_pkg.rs_middle;
      execute immediate 'alter session set session_cached_cursors = 100';  // reduced this to 50, 20, 10 & 5 - no effect.
      for i in 1..1000
      loop
        DEMO_141_PKG.parse_bind_execute_close('Y');
      end loop;
     -- runstats_pkg.rs_stop;
    
    END QUICKFIX142;
    Published by: Paulie August 12, 2011 14:18

    If you modify the called package by adding:

      -- CLOSE THE CURSOR
      dbms_sql.close_cursor(l_cursor);
    

    in

    procedure parse_bind_execute_close(p_input in varchar2)
    AS
      l_cursor number;
      l_output varchar2(4000);
      l_status number;
    BEGIN
      l_cursor := dbms_sql.open_cursor;
      dbms_sql.parse(l_cursor, 'SELECT * FROM Dual WHERE Dummy = :x', dbms_sql.native);
      dbms_sql.bind_variable(l_cursor, ':x', p_input);
      dbms_sql.define_column(l_cursor, 1, l_output, 4000);
      l_status := dbms_sql.execute(l_cursor);
      if(dbms_sql.fetch_rows(l_cursor) <= 0)
      then
        l_output := null;
      else
        dbms_sql.column_value(l_cursor, 1, l_output);
      end if;
      -- CLOSE THE CURSOR
      dbms_sql.close_cursor(l_cursor);
    END parse_bind_execute_close;
    END DEMO_141_PKG;
    

    Then the script runs with the default OPEN_CURSORS parameter:

    SQL> connect / as sysdba
    Connected.
    SQL> show parameter open_c
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    open_cursors                         integer     300
    SQL> connect test/test
    Connected.
    SQL> exec quickfix142;
    
    PL/SQL procedure successfully completed.
    
  • Enable or disable the write lock filter remote with a script

    Hello

    Is it possible to enable or disable the filter of writing EWF remotely with a script?

    Sending a command in a batch or the vbs.

    Thank you.

    In addition to HPDM, you can use the ewfmgr command in a script.  For example, ewfmgr c:-disable or ewfmgr c:-activate.  You will need describe reboots as well.

  • Need help with a script (o - o8) *, see the Virgin if there is no

    Hi all what I need help with a script I can't find an example.

    I'm trying to subtract 2 numbers and then multiply this product. (o o8) * one but I just want to do the calculations if all fields have the numbers IE field o, o8 of field and field one.

    Thank you in advance. I was stuck on this days searching the Internet.

    Assuming you want to affect the outcome of this calculation in another text field, use this code as a custom field calculation script:

    var o = this.getField("o").valueAsString;
    var o8 = this.getField("o8").valueAsString;
    var a = this.getField("a").valueAsString;
    if (o!="" && o8!="" && a!="") event.value = (Number(o)-Number(o8))*Number(a);
    else event.value = "";
    
  • How to write the script of commands to send an email without installing any email program (like outlook)?

    Hello

    We are able to send emails with mapisend in the batch script. MAPIsend command works very well as we installed it in our outlook computer.

    But we need to send e-mail to batch script without having any outlook e-mail program installed. Please help us on this.

    Thank you

    Sarah B

    Don't Mob No + 91 9095286870

    MB

    Which would be better asked here

  • Help with tab script and auto custom calculation

    I have implemented a two-page order form in Acrobat, based on an InDesign exported to PDF and filled it with the fields for 30 items that can be ordered.  Each item can be ordered has a color, size, quantity, unit price and Total point (the last two are read only) field.  To the point Total, I used "value is the product of Quantity.x, Price.x of the unit") calculation and to calculate the subtotal, "value is the sum of the Total of the order of the day.

    My first problem is that the scope of subtotal does not reflect the exact amount I have label off a quantity field and enter additional data on the order form.  I would like for the date to be included in the subtotal as soon as it is seized.  I read a script custom hits (tab the cursor on the following fields after the form data of types of recipients in an area of the car) which could deal with this problem, but one) I can't find the script and b) which should be formatted custom for a field that must be the number in the format.

    My second problem is coming up with a custom to variable shipping rates, calculation script based on the subtotal:

    up to $25 - $6; 25.01 $ - $75 = $11,50; $75.01.00 - $125.00 = $15.00

    125,01 $ - $200.00 = $20.00; 200.01 $- $300 = $25.00; $300.01 - $400 = $30.00

    $401,01 - $600 = $50

    I would like to have two radio buttons, one for select Pickup (no charge) and the other to select priority mail delivery - the option button that selects priority mail shipping will show the amount of shipping in a separate, called text box shipping charges.

    I also need a calculation that adds 5% of the subtotal more ShippingFee, if people pay by credit card.  I was hoping that a calculation simple field would take care of it.  (Subtotal + ShippingFee) *. 05)

    For any help or suggestion would be appreciated.  If I need to download the form, I can do this, even if I need to know how to do this.

    See what Bill.

  • Need help with a script customized for processing in Photoshop CS4 of images in batches. Really grateful for the help thereby.

    Hi people.

    So I have a boatload of pictures that I have to deal with as I'm moving off Ebay and open my own online store and the images that I have on Ebay, although excellent quality are not square, and unfortunately, the model that I use in Wordpress requires square photos.

    Basically, what I need is a script that I can use in batch mode, which will focus on the size of the image and change the canvas size to be square corresponding to the current long image side. Resize the image to 1600 square pixels and finally save for web in JPEG quality 60.

    Normally I would muddle my way through this trying to teach myself but I already do so much with this new project that I can't afford to pay developers for help that I would really appreciate if someone could help me with this script. I use Photoshop CS4 if it made a difference.

    Thanks much for any help you can offer.

    See you soon,.

    J

    A simple gesture can do that. What you need to do is that the action of lot.   With the help of Photoshop Image Processor script.  The Action is a two-step

    N ° 1). File menu > automate > fit Image.  In the dialog box Image Fit you assign Width and Height 1600 pixels.

    Step 2.) Menu Image > canvas size.  In the canvas size dialog box, you assign Width and Height 1600 Pixels.

    Record the action in some action with a name like 1600PxSquare

    Then use the file menu to Photoshop > Scripts > image processor. In the dialog to the Image Processor script. Select your image source folder. Set where you want your jpeg images. Set it to save jpeg files quality 6.  Set it to include your 1600PxSquare action.

    Step adjustment image resize your image to fit in a 1600 x 1600 pixels are while keeping image proportions of images. Portrait image will be high 1600px and landscape image will be 1600px wide.  The step size canvas will add the canvas to make the place of the image.  Portraits will have a border on the left and right images of landscape will be confined to the op and downs.

  • Help with a Script to remove the additional paths and save

    Here are a few scripts that I have at the moment, but none work. With the first script, I get an error with the 'indexOf', and with the second script, it keeps only the second name listed in the string. How can I get either of these to work where I can remove all the paths, with the exception of multiple ones I want to keep?

    function deletepaths()
    {
      if (!documents.length) return false;
    
    
      var doc = activeDocument;
      var save = ["Ex1", "Ex2", "Ex3"];
    
    
      for (var x = 0; x < doc.pathItems.length; x++)
      {
        if (save.indexOf(doc.pathItems[x].name) == -1))
        {
          doc.pathItems[x].remove();
        }
      }
    }
    deletepaths();
    

    deletepaths();
    function deletepaths(){
    if(!documents.length) return;
    var doc = activeDocument;
    for(var a = doc.pathItems.length-1;a>-1;a--){
    if(doc.pathItems[a].name != ("ex1", "Ex2")) 
         doc.pathItems[a].remove();
      }
    }
    

    IndexOf does not work with extension script. Most likely, you would need a number if statement for many golds ' | ', or a loop in the loop goes well your path names.

  • How to remove the selected area with a script that would ignore the fact if the selected area is transparent or the fact that it has no selection?

    Hello

    My friend works on an action, who would edit images by removing the white background color. However, there are a lot of images with transparent background or after some other actions have no selection who had to be removed. And now he is facing simple problem, simple remove this feature brings a lot of table and the error Stops.

    The ideal solution to this problem would be if it would ba a script who could remove the selection and ignore stops as no selection and transparent.

    Can anyone help with this one?

    Settle into the Photoshop scripts forum.

    With a script, you would just put your code in a try/catch block. This intercept errors such as the selection of a transparent area and do not stop your script:

    try{
         //your code here
         }
    catch(e){
         //either no code, or code to do something if you get an error.
    }
    
  • Complete the VI Client with PowerCLI Script idle Sessions

    Hello gurus PowerCLI

    I searched the net for a script PowerCLI that would end all the VI client sessions that have been inactive for x period of time.  I found a post on the forums of VMware (http://communities.vmware.com/message/914858?z=zI0r8n) but had no luck with it.  I also found a script created by A.Mikkelsen, to http://www.amikkelsen.com/?p=384 , but that one does not work either.

    Here's the actual script by A.Mikkelsen that is based on code by LucD in the forum mentioned previously.

    BEGINNING

    ##################################################################################
    # The script terminates all sessions if idle idle user for more than xx #.
    #                             #
    # Created by: Anders Mikkelsen, 2010 #.
    ##################################################################################
    Claire
    # Add - PSSnapin VMware.VimAutomation.Core

    # $server = "vcenter server.
    # $user = "vcenter username.
    # $pwd = "password of vcenter.

    # Add 1 extra hour when, due to the difference of timestamp between MSSQL and Windows.
    # slow down time 5 hours = 360
    # 10 hours slowed = 660
    $intOlderThan = 60

    # Connect-VIServer $server - user $user-password $pwd
    # Connect-VIServer $server

    $svcRef = new-object VMware.Vim.ManagedObjectReference
    $svcRef.Type = 'ServiceInstance.
    $svcRef.Value = 'ServiceInstance.
    $serviceInstance = get-views $svcRef

    $sessMgr = get-view $serviceInstance.Content.sessionManager
    $oldSessions = @)
    {foreach ($sess in $sessMgr.SessionList)}
    If (($sess.)) (LastActiveTime) .addminutes ($intOlderThan) - lt (Get-Date)) {}
    $oldSessions += $sess. Key
    #write "$($sess.)". User name)'
    }
    }

    # Session terminal that are inactive for more than approved ($intOlderThan)
    $sessMgr.TerminateSession ($oldSessions)

    Disconnect-VIServer *-confirm: $false

    END

    The error message I get is:

    BEGINNING

    Exception calling 'TerminateSession' with '1' or the arguments: "it was not correct to specified parameters.

    "

    D:\Scripts\vc_terminate_idle_sessions.ps1:36 char: 26

    + $sessMgr.TerminateSession < < < < ($oldSessions)

    + CategoryInfo: NotSpecified: (:)) [], MethodInvocationException)

    + FullyQualifiedErrorId: DotNetMethodException

    END

    I should mention that my knowledge of PowerCLI is almost nothing, so any help in tweaking this script to make it work with PowerCLI 5.1 Release 2 and VC 5 U2 would be much appreciated.

    The error is caused by the fact that you are trying to kill your own session (if it was started long time ago).

    Apparently in vSphere 5. they included a security mechanism integrated to avoid this.

    You can take this by adding a simple test.

    ## max number of idle minutes for sessions to keep$intOlderThan = 60$serviceInstance = Get-View 'ServiceInstance'## get the session manager object$sessMgr = Get-View $serviceInstance.Content.sessionManager## array to hold info about stale sessions$oldSessions = @()foreach ($sess in $sessMgr.SessionList){    if (($sess.LastActiveTime).addminutes($intOlderThan) -lt (Get-Date) -and          $sess.Key -ne $sessMgr.CurrentSession.Key){        $oldSessions += $sess.Key    } ## end if} ## end foreach
    
    ## if there are any old sessions, terminate them; else, just write message to the Warning streamif (($oldSessions | Measure-Object).Count -gt 0) {    ## Terminate sessions than are idle for longer than approved ($intOlderThan)    $sessMgr.TerminateSession($oldSessions)} ## end ifelse {Write-Warning "No sessions that have been idle for more than '$intOlderThan' minutes; no action taken"}
    
  • How to set the units creating paths with a script?

    I'm trying to update a script that used to work in Photoshop CS4, but that seems to completely ignore the units that I use in the clouds.  The script below should create a path with two lines that form an X through the whole document.

    To test, I created a new page 8.5 x 11 inches and 300 DPI.  I then run the script.  However, the form that is produced is huge and most are off the screen.  What I am doing wrong?

    function Point(x, y)

    {

    This.x = x;

    This.y = y;

    }

    function addVertexCorner (lineArray, x, y)

    {

    var p0Info = new PathPointInfo();

    lineArray.push (p0Info);

    p0Info.kind = PointKind.CORNERPOINT;

    p0Info.anchor = new Array (x, y);

    p0Info.leftDirection = p0Info.anchor;

    p0Info.rightDirection = p0Info.anchor;

    }

    function appendLine (p0, p1, lineSubPathArray)

    {

    var lineArray = new Array();

    addVertexCorner (lineArray, p0.x, p0.y);

    addVertexCorner (lineArray, p1.x, p1.y);

    pathInfo var = new SubPathInfo();

    lineSubPathArray.push (pathInfo);

    pathInfo.operation = ShapeOperation.SHAPEADD;

    pathInfo.closed = false;

    pathInfo.entireSubPath = lineArray;

    }

    function createPathLayer (title, subPathArray)

    {

    var app.activeDocument = docRef;

    var originalUnit = app.preferences.rulerUnits;

    app.preferences.rulerUnits = Units.PIXELS;

    var myPathItem = docRef.pathItems.add (title, subPathArray);

    app.preferences.rulerUnits = originalUnit;

    }

    var app.activeDocument = docRef;

    var imgWidth = docRef.width.as ("px");

    var imgHeight = docRef.height.as ("px");

    P00 var = new Point (0, 0);

    P10 var = new Point (imgWidth, 0);

    P01 var = new Point (0, imgHeight);

    P11 var = new Point (imgWidth, imgHeight);

    var lineSubPathArray = new Array();

    appendLine (p00, p11, lineSubPathArray);

    appendLine (p01, p10, lineSubPathArray);

    createPathLayer ("Big X", lineSubPathArray);

    The code you have posted product lines with points in the corners of the image for me when the image is 72DPI.

    Could you post a screenshot of the faulty results with the relevant panels visible?

    OK, but what is so special about using 72 DPI?

    At 72 dpi 1 pixel corresponds to 1 point.

  • Change the size of the Page with a Script

    I did work in Illustrator which is defined as two-page spreads on 1 work plan.

    I need to convert this unique double pages.

    I.e. If for half of the documents, I need set the anchor point of the document at the top on the left and half the width of the artboard.

    For the other half of the documents, I need set the anchor on the right and half the width.

    Is this possible with scripts?

    I look around online to find ways to access the document and anchor point using the script, but not can't find all resources.

    Thanks for any help that can be offered.

    Edit: It is also possible to create a new work plan with a script and assign it a name?

    Here you go, this script splits the artboard into two

    // carlos canto
    // http://forums.adobe.com/message/5380624#5380624
    
    var idoc = app.activeDocument;
    var ab = idoc.artboards[0];
    var abBounds = ab.artboardRect;// left, top, right, bottom
    
    var ableft = abBounds[0]; // 0
    var abtop = abBounds[1]; // 612
    var abright = abBounds[2];
    var abbottom = abBounds[3];
    var abwidth = abright - ableft; // 792 // width
    var abheight = abtop- abbottom; // 0 // height
    
    var half = ableft + abwidth/2;
    
    var abright2 = half;
    ab.artboardRect = [ableft, abtop, abright2, abbottom];
    
    var ableft2 = half;
    var newAB = idoc.artboards.add([ableft2, abtop, abright, abbottom]);
    
  • I have acrobat installation, when I run the program it comes up with a script error

    I have acrobat installation wrong when I run the file, it comes up with a script error

    Hi Pat

    Thank you for your e-mail.  I was able to download and install this morning with no problems.  I uninstalled the old version yesterday and restarted my computer, but still have errors.  However when I turned off last night, ran Windows updates and who has fixed the problem.  I also got rid of firefox and put Google chrome.  All use messages to Australia click and send that would not work because of an error with the plugin.  Thanks for your very fast reply, I appreciate your help.  Have a great day.  Best looks, Judy (moo2u2)

  • I need the XML elements appear in the various paragraphs...  Could do with a script?

    I need of the XML elements appear in different paragraphs ...
    Pourrait to do this with a script?

    Thank you...

    You can use this / Puedes usar esto

    insertTextAsContent("\n",XMLElementPosition.beforeElement);
    //  or
    insertTextAsContent("\r", XMLElementPosition.afterElement);
    

    Necesitaria mas information,

  • CS3: need script to replace spaces with underscores in the paragraph and character style names

    Help! I am very new to scripting.

    I managed to find and tweak existing javascripts to search through all my paragraph styles to disable hyphenation and off balance the jagged lines, but I need help with this one.

    I work on Mac OS 10.4.11 using Indesign CS3.

    I need a script that will search all my paragraph and character styles in my open Active document and replace spaces by underscores.

    Can someone help me with this? It would be greatly appreciated!

    1. I don't know, but I think you can use all the regular GREP inside this function codes. Do not use the quotation marks around of the expression, use slashes! (Why? Just a curiosity of Javascript... maybe a hack that goes back to the gray mist of JS development...)

    This work should - but rather the code above, this is not tested:

    .. Replace (/ [-\ / ()-. _] + / g. '_');

    The GOLD group inbetween the brackets contain all the characters you want to replace with an underscore: the hyphen (this has to be the first character in the group, else it will be interpreted as a range of characters from each side!), space, slash (this one is 'special' inside the function replace JavaScript, so I think he needs to escape with a backslash)! in parentheses, a period (not sure if it should escape - into ordinary GREP, it's the wildcard character for any character, but maybe he loses his magic within a group of GOLD) and finally... the underscore character. Why?

    Well, this replacement string comes with a free bonus. Note the sign after the installment of GOLD +. This means that a whole sequence of these characters is replaced by a simple underscore: "it's / a - / test" will become "This_is_a_test". Adding the underscore line itself to the string of research means that it will also find the whole chain 'space space (stroke underscore)' in 'This style (_)' and, oh magic!, replace it immediately with a single underscore.

    Just FYI, the tiny "g" after the closing slash is abbreviation of 'global', i.e. at the global level, replacing in this string. replace the default values for a replacement only (why? see above...), and adding the 'g' ensures he keeps replacing until it is not find matches more.

    2 see point 1.

    3. uh, yes it's true, but you will need to check very carefully if nothing inside one of these basic models is substituted. You can apply a base style and add substitutions to make look like a subtitle, but that isn't making it a. And to the next paragraph, you can apply a base style and add substitutions to make it look like a paragraph of plain text (etc.). It's a signature of witness to bad formatting...

Maybe you are looking for