Adding a substring within an Essbase calc script

All,
I need to do something a bit unusual. I need to take a value from one Account member and assign it to another, using a portion of the account member name.
For example:
fix ("fy12", "jan", "actual")
"001"(
"PostAllocated"->"995"->"995_In"->"997_Out"->"*ACCOUNT_XXX*" = "PostAllocated"->"995"->"995_In"->"997_Out"->"*ACCOUNT_XXX*" +
("Run1"->"PreAllocated"->"000"->"IC_InLoadMember"->"IC_OutLoadMember"->"APLoadMember") * ("Run1"->"PercentAllocated"->"000"->"001_AP"->"995_In"->"997_Out"->"NA_Entity"->"AcctLoadMember");
endfix
where "ACCOUNT_XXX" is where I'd like it to be 58321_XXX , for example. This will not be fixed on any specific accounts, it will apply to all accounts so in this case we want it to take the substring of the left side of the account member name and apply it to membername_XXX, a different account.
Thanks in advance!

At the risk of being hit over the head with a stick...
An alternative means of accomplishing this:
You can write a Java CDF that easily and in simple syntax handle your string mangling needs here.
I would create a couple:
String @SubString(String wholeString, double start, double length)
String @Concat(String start, String End)
In fact its quite possible that one of the Essbase Labs CDFs already handles this requirement.
Regards,
Robb Salzmann

Similar Messages

  • Enhanced Calc Script more flexible than native Essbase Calc Script?

    What makes an Enhanced Calc Script more flexible than native Essbase Calc Script?
    Run on Save or @CALCMODE function or Run time prompts or Can be run over the web or Substitution Variables or Custom Defined Functions.
    Appreciate if u reply ASAP!!
    Thanks in Advance!!!

    Some posts on the subject
    Business Rule
    Business rule
    Business rule
    Cheers
    John
    http://john-goodiwn.blogspot.com/

  • Execute Essbase Calc Scripts from FDM

    Hi,
    Can any of you let me know how to execute Essbase Calc Scripts from FDM, these Calc Scripts are on Essbase Server. Any help would be greatly appreciated.
    Thanks

    See the thread below:
    Re: FDM - Script

  • Restrict Planning Admin from seeing all Essbase calc scripts

    Hi - I have a few ppl who are Administrators on Planning and they see all of my calc scripts in Essbase. Is there a way to block them from seeing them? I have those calc scripts to run things that they do not need to run.
    I am using Planning 3.5.1, Essbase 6.5
    Thanks,
    Cindy

    Hi Cindy,
    I assume the calc scripts you want to block from the Planning Admin's are within the applications they are administrators of correct?
    The only way I can think to do this is to place these in another directory on the server or on a share you have access to and use Esscmd scripts to execute them in a batch function.
    e.g.
    RUNCALC 3 C:\SERVER_DIR\mycalcs\calc
    Presuming the directory were on your essbase server and you schedule this on your essbase server.
    This assumes your Planning Admins do not have access to your Essbase server. Of course if this were unix the path to the script would be different.
    You could also only have the scripts on your local machine.
    Regards,
    John A. Booth
    http://www.metavero.com

  • Call ODI 11g scenario from Essbase calc script/business rule using ODI SDK

    I am looking for any hints on how to use the ODI 11g SDK. I want to call a java application (CDF) that runs an ODI scenario using RUNJAVA in Essbase which I have successfully done in the 10g environment.
    The java application has the odi-core.jar included in the project and registers OK with Essbase and I have replicated code from the Oracle sample code site. When I run the application in a calc script I get the following error:
    EssbaseCluster-1.EFTS.EFTS.odi     Execute calculation script     June 17, 2011 10:20:40 AM NZST     Failed
    Error: 1200456 Problem running [indigo.essbase.odi.RunODIScenario]: [java.lang.NoClassDefFoundError: org/springframework/util/StringUtils]
    When I comment out the code that calls the creates the OdiInstance then the java app executes fine - i.e. writes something to the Essbase log.
    The research I have done so far indicates that a classpath is incorrect. If that is the case where do I start looking to correct the classpath? Is it the ODI classpath or the Essabase classpath?
    Any tips would be grateful.
    Thanks.

    You need to import more jars to execute this
    following are the jars
    1)     bsf.jar
    2)     bsh-2.0b2.jar
    3)     commons-collections-3.2.jar
    4)     eclipselink.jar
    5)     odi-core.jar
    6)     ojdl.jar
    7)     oracle.ucp_11.1.0.jar
    8)     persistence.jar
    9)     spring-beans.jar
    10)     spring-core.jar
    11)     spring-dao.jar
    12)     spring-jdbc.jar
    Once you have this in classpath - your scenario will execute
    Hope this helps.

  • Retrieve imported and validated Entities for further ESSBASE calc Script

    Hi folks,
    once the FDM processing is finished:
    The Event Script AftConsolidate is executed.
    It is retrieving all unique Entity entries (trialbalance command), Period (POV), Scenario (POV) etc. and is bulding a dynamic ESSBAE calc script command which is afterwards executed to ensure that even the leaf member are correctly transferred to ESSBASE, the nodes are refreshed/aggregated as well.
    This works perfectly ;-)
    MY ISSUE:
    I want to clone this logic into a custom web script which then can be executed adhoc via webfrontend / Task Flow.
    I tried to copy the AftCondolidate Script into this custom web script. UNFORTUNATELY i get an error: saying DATA ACCESS ERROR
    My assumption is, that the trialbalance command does not work wit the custom web scripts.
    Is that right? Are there any workarounds how to retrieve out of a custom web script the entity dimension and store the unique entity entries in an array?
    regards
    Hau

    You don't need a custom script. FDM has functionality to call the consolidate action only, check the activities menu

  • Essbase calc script performance issues

    Hi,
    I have essbase 9.3 running on Sun solaris 4 CPU, 16 GB server. The calc script "calc all" takes ~3 hrs to complete.
    This is the calc script.
    /ESS_LOCALE English_UnitedStates.US-ASCII@Binary
    SET UPDATECALC OFF;
    SET CALCPARALLEL 4;
    SET CALCTASKDIMS 2;
    CALC ALL;
    We don't have to calc all dim, but even if we
    But even with specific dim we get the same timing. Below is the script
    SET UPDATECALC OFF;
    SET CALCPARALLEL 4;
    SET CALCTASKDIMS 2;
    FIX ("Y2009", "Actual");
    CALC DIM("Data Source","Intercompany","LegalEntity","Site","Department","Entity");
    ENDFIX
    The ess00001.ind is 700 Mb and ess00001.pag is 2.1 GB.
    In Admin services, this is what I see for caches
    1) Index cache size is 1 GB for this DB
    2) Index cache current value is 1gb
    3) Datafile cache setting is 1.5 GB
    4) Datafile cache current value is 0 (?? not sure why??)
    5) Data cache setting 4.1 GB
    6) Index page setting 8 kb
    please help ...
    Thanks
    Moe

    Moe,
    I'm guessing you inherited this thing, else you would know why the cache settings are what they are, but here are some thoughts:
    Caches:
    3) Datafile cache setting is 1.5 GB
    4) Datafile cache current value is 0 (?? not sure why??)You're running the database in Buffered I/O, so the data file cache is ignored.
    1) Index cache size is 1 GB for this DB
    2) Index cache current value is 1gb You have consumed all of the cache -- I'm a little confused, as you state your .ind file to be 700 megabytes -- generally the index cache consumption doesn't go beyond the .ind file size. When you look at your hit ratio statistics in EAS, does it show a 1 against the index cache? If yes, then you don't need to look any further as that's as good as it's going to get.
    5) Data cache setting 4.1 GBUnless you're using MEMSCALINGFACTOR, I don't think Essbase is actually addressing all of the memory you've assigned. What are you showing as actually used? In any case, having a data cache almost twice as big as the .pag files is a waste as it's way too large.
    Easy, off the cuff suggestions without knowing more about your db:
    1) Try AGG instead of CALC DIM for sparse dimensions.
    2) Try turning off (yes, turning off, you'd be surprised) parallel calc, and benchmark it. It will probably be slower, but it's nice to know.
    3) Dimension order? Modified hourglass?
    4) Tried defragmenting the database and benchmarking the performance?
    5) What is your block size? Big? Small?
    6) I think you are not calculating your Accounts/Measures dimension in your calc? If you are, and it's dense, could you make those Accounts dynamic calc -- dropping a dimension from the calc can be huge.
    I'm sure there will be other suggestions -- these are the easiest.
    Regards,
    Cameron Lackpour

  • Peculiar problem with Essbase (Calc Script) - substitution variable / UDAs

    This is odd but I have a script like :
    VAR iloop=1,break=0;
    FIX(<required POV>)
    Loop (20,break)
    VAR Country_total1,Country_total2,Country_total3;
    FIX (@UDA(Entity,@ALIAS(@CONCATENATE("&Country",iloop)))) // &Country1, &Country2 - are substitution variables with UDAs stored as strings
    Statements;
    /* +<statements for calculating total values.. for that country and stored against variables>+ */
    Country_total1=Country_total1+ +<Calculation>+
    ENDFIX
    /* Second part : Now again the calculations stored in the variables are to be stored against specific entities */
    FIX (@UDA(Entity,@ALIAS(@CONCATENATE("&Country",iloop))))
    FIX(@ISUDA(Entity,<Check1>)
    ..... Assign to relevant account
    ENDFIX
    ENDFIX
    ENDLOOP
    ENDFIX
    Now the problem is that the first fix statement works just fine, but the FIX statement in the 'second part' throws an error
    Error: 1200354 Error parsing formula for [FIX STATEMENT] (line 66): expected type [STRING] found [EXTVAR] ([iloop]) in function [@CONCATENATE]
    If I hard code the 'second part' FIX statement to the substitution variable directly - it works just fine.
    How can the first statement work and not the second one ? They are exactly the same.

    Glenn, thanks - I hadn't thought of that :).
    But it still does not entirely solve my problem (please see my previous post depicting a requirement similar to ours )
    - We have lots of countries (50-60+ might be much more) and each country can have multiple entities (3-4 on an average - can go unto 7-8)
    - so good guess would be around 200 entities
    - So say I have to do it for 2 countries only (two entity types). Then I need 4 variables - 2 for each country ('country 1 ET1 total', 'Country 1 ET2 Total')
    When the list is 20 counties - variables become 40 :(.
    - Still leaving aside the 40 variables for a bit -
    There are subsequent steps of calculations which needs to be done based on these totals (which are exactly the same for all countries) - just that we need the correct totals to begin with and the rest is already stored in the DB
    So since I have a different variable for each country - I cannot write one single calculation block to use the variables sequentially one by one (can I ?)
    I might have to write a separate calculation block for each of these countries. (20 separate blocks)
    That's what I was trying to avoid and simplify with the substitution variable (but is not working)
    - Create substitution variables - which would store the alias of the required countries (2/10/20 as many required)
    - Loop through these substitution variables - using them one by one
    - So I just need one single block of calculation with all the variable in the calc script being reused after each country calculation is done
    - and the user need not go into the script, as the only thing that will change are the countries. And he can change it easily through the substitution variable.
    Edited by: Ankur on Jun 27, 2012 12:53 PM

  • Automate the process of changing the subvariables in Essbase calc script?

    Hi Experts,
    I have two calc scripts called HourlyAgPre & HrlyAgPost and in these calcs I am using Subvariables. Like wise i have 4 regions and there are so many calc scripts. during month end close i have to go and change the subvariables manually. is there any way to change the subvaribles at one time using Maxl script?
    Eg:
    In BD9 My subvariable needs to point to Preclose
    In BD-3 my subvaribles need to poit to Postclose.
    Please suggest me if you come across this?
    Thanks in advance.

    Hi,
    Here is example of setting variables through Maxl and passing parameters into the maxl script Re: Update variables
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Simple subtraction operator not working in essbase calc script

    My Calc Script
    SET UPDATECALC OFF;
    fix (Employee)
    "NoOfBeginners" = "NoOfStayers" - "TerminationCount" ;
    endfix;

    Hello
    you need to bring all data first to the member Employee. It will be loaded on the individual members of Employee. Assuming the accounts dimension is dense (Database > Properties > second tab)
    SET UPDATECALC OFF;
    CALC DIM(Employee);
    FIX (Employee)
    "NoOfBeginners" = "NoOfStayers" - "TerminationCount" ;
    ENDFIX
    Better would likely be to do this at the lowest level, and then aggregate the result to the top. Now at all positions you have data on NoOfStayers or TerminationCount you will see data in NoOfBeginners. We do not discuss what should happen when one of the two is empty...
    SET UPDATECALC OFF;
    "NoOfBeginners" = "NoOfStayers" - "TerminationCount" ;
    CALC DIM(Employee);
    Hope this helps.
    Regards,
    Philip

  • Tuning Essbase Calc Scripts

    Hi,
    I am looking for some guidance on tuning a calculation script.The business rule perform forecasting for two years based on the historical data (upto 5 years). The rule performs well when it is executed against a single department, single activity and single project.However when I try to run the admin rule which performs the same function but for all departments, all classes and all projects. it never completes.
    Your feedback is really appreciated.
    Sincerely,
    JJ
    Note in this example:
    Activity and Project are dimension.
    Total# of Departments = 7000 members
    Activity = 100 members
    Project = 100 stored members
    Accounts = 350 stored members

    Hello JJ,
    for tuning an essbase database a consultant may use a day or more. Not something to be handled properly in a forum.
    What we can do here is to give you some guidelines.
    Calculate only what is necessary. Data which have been calculated and are not changed, do not need to be recalculated. Data which will be modified in a next step, should not be aggregated and then be aggregated again.
    When you calculate, much is related to to the block size and how fast Essbase can get the blocks into memory and back to disk. So optimize the blocks (dynamic calc on the parent members, label only on where no data storage should take place).
    Then optimize the calculation. Work with parallel calculation. And test, test, and test.
    Regards,
    Philip Hulsebosch

  • Essbase calc script problem

    How to push down the value of a member to all its descendants.Thanks for your help.

    Here is a simple way that assumes only that you are doing this for a single measure. If you have multiple measures that you are doing this for, there are other ways (i.e., include the measures in the fix, and choose another dimension for the reference point/calc member).Fix ( @Descendants( Member ))     Measure = Measure->Member;EndFix-Doug

  • Essbase Calc Script - Fix inside an IF

    Hi,
    Is FIX allowed inside the body of an IF?
    Appreciate your thoughts.
    Thanks,
    Ethan.

    You can not have a fix inside of an IF but you can have an IF inside of a FIX. It would not make sense to have the first as a fix limits the number of blocks while an If does not. So you would be saying look at all blocks to see in what cases I limit them. If I'm looking at all blocks, how can I limpose a limit on them. In the second case you are saying in the subset of blocks I'l looking at, do I have this condition

  • Calc Script Clarification

    Hi,
    In our Hyperion Planning System there are 7 Dimensions. Two of them are Locations and Accounts.
    There is a one script which written earlier which we need to understand as follows,
    VAR M1
    M1= 9998;
    FIX(Budget,FY09,Monthly,P000)
    FIX(Jan)
    +"Location A"+
    +(+
    IF (M1 = 9998)
    +"Finance Charge" = "Finance Charge" * 100;+
    ENDIF;
    +)+
    ENDIFX
    ENDFIX
    Please let us know the propose of having *"Location A"* before the IF statement

    Nilaksha,
    You're looking at an Essbase calc script/Hyperion Business Rule and within that, a member calc block.
    Member calculation blocks are started with a member, i.e., "Location A", then a left parentheses, then code, then a right parentheses.
    What's weird about a member calc block is that you could write it to use just the account you want to calculate, i.e., "Finance Charge", or another member from the same dimension. Why would they be different? Perhaps originally Location A was calculated along with Finance Charge and then got removed? <--That seems likely, as you can assign values to more than one member in a member calc block.
    It's confusing -- you would think that you'd only be able to write to one, but that isn't so.
    "Location A"
    IF (M1 = 9998)
    "Finance Charge" = "Finance Charge" * 100;
    "Location A" = something * something ;
    ENDIF;
    )What's also interesting about calc member blocks is that you don't need to assign the member on the left hand side of the equals sign for the member defined in the block such as:
    "Finance Charge"
    IF (M1 = 9998)
    "Finance Charge" * 100;
    ENDIF;
    )It's basically like taking a formula out of the outline and putting it into a calc script.
    One last thing -- Essbase calc script variables (M1) can only be used within member calc blocks -- unfortunately not elsewhere.
    Btw, I assume your example was redacted for public consumption, as it always fires with M1 is always equal to 9998.
    Regards,
    Cameron Lackpour

  • Executing a calc script in MAXL

    "Heaven to murgatroid" this has completely defeated me today so all help will be gratefully accepted.
    I have an Essbase application (NPG3BK) with 4 databases (BMR, Detail, Main & Workforce)  - 3 are Planning Types and a fourth is added for reporting.
    I have 1 Essbase Calc script at application level - the calc script is called ExBinAll. It verifies perfectly and I can run it manually against any of the databases.
    I have a MAXL script to run the calculation against each of the databases under NPG3BK. The relevant piece of code is...
    alter system load application 'NPG3BK';
    execute calculation NPG3BK.'ExBinAll.csc' on database BMR;
    However when the batch runs I get this message...
    ERROR - 1012500 - The requested calc script [ExBinAll.csc] not found.
    Environment: Win2008 R2
    Essbase: 11.1.2.1.600
    Logged on to Win2008 with a server administrator ID.
    Logged into Essbase/MAXL with an Hyperion administrator ID.
    I have checked the application name and calc script name SO many times through EAS and Windows Explorer. It's there!!
    Can anyone out there resolve this for me?
    Many thanks for your help
    PW

    Celvin, many thanks - unfortunately that didn't work either..
    I've tried..
    execute calculation 'NPG3BK'.'ExBinAll' on database BMR;
    execute calculation 'NPG3BK'.'ExBinAll' on database 'BMR';
    execute calculation 'NPG3BK'.'ExBinAll.csc' on database BMR;
    execute calculation 'NPG3BK'.'ExBinAll.csc' on database 'BMR';  and ALL got the same error code 1012500
    So I decided to try store the calcscript ExBinAll under the database NPG3BK.BMR and run it with the following syntax ..
    execute calculation NPG3BK.BMR.'ExBinAll.csc';   gives      ERROR - 1012864 - Calculation script name [ExBinAll.csc] is longer than [8] characters.
    execute calculation NPG3BK.BMR.'ExBinAll';   gives      the original (1012500) error.
    execute calculation 'NPG3BK'.'BMR'.'TEST.csc';    gives      the original (1012500) error.  {ERROR - 1012500 - The requested calc script [TEST] not found.}
    Any other ideas from anyone?

Maybe you are looking for

  • Rejected records into different Table.

    Hi , I have a .ctl file and .txt file. for the normal scenario, I use SQLLDR to load data into my table using ctl file and all rejected records will be sent to bad files. But I wanted all the unloaded or Bad records into different table. do we have a

  • Jar file - files with execute permissions (Unix)

    I want to jar up a bunch of files. These files have execute permissions. When I jar it up jar -cvf myjar.jar <list of files> Then I do jar -xvf myjar.jar It extracts the files, but the files loose the execute permissions. How can I keep the same perm

  • Attachments --purchase order

    Hi, I have around 200 standard purchase orders and i have to insert attachments to around 100 purchase orders My question is 1. Do i have to create manually or 2.Is there any Api program for it to insert for that 100 purchase orders. Regards Sudharsh

  • Application Specific Bandwidth Management?

    Is there any utility out there that would allow one to manage bandwidth on an application by application basis? I have never understood why this is not built into all applications that are network intensive (specially Internet) related. Many applicat

  • Asus geforce 3

    Just wanting to know if i will have any problems installing solaris 8 with a geforce 3 card. thanks