Smartview VBA function for launch calc-scripts as strings. like EsbCalc ???

We have used an Excel VBA which launch an calculation script from a STRING using the VBA Add-In function "EsbCalc".
We would like to migrate to Smartview VBA functions.....
The calc-script string has "parameters" which are modified at run-time...
I have found the function HypExecuteCalcScript - but seems that use as parameters ONLY the calc-script name...
Is it any VBA function in SmartView which launch a calc-script string (not a calc-script name) ?
We are using EPM 11.2
Thanks...

A tip I just learned at Kaleidoscope 2010* is that one can create a calc script consisting entirely of a substitution variable. In other words, a calc script can look like this:
&Calc
Smart View VBA does have a function for changing or creating substitution variables (HypSetSubstitutionVariable). You could create a calc script and subvar in your database as above. Then, at run time, set that subvar to your calc string with HypSetSubstitutionVariable and execute the calc script with HypExecuteCalcScript.
Quick test (11.1.1.3) shows that this really works.
I can't remember privileges required to create or set subvars vs execute calc strings off the top of my head - might be an issue (I ran as an admin). Also this approach doesn't support concurrent users, unless they each have a calc script and subvar to themselves. Still, depending on your exact situation, this might be a feasible workaround.
*I won't credit the presenter solely because the tip came from a presentation which he specifically declined to make public domain.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Smartview VBA functions

    Hi All,
    Is there any link or documentation listing the VBA functions for Smartview equivalent to the functions in excel addin.
    Thanks,
    Raja

    You too have noticed that there are quite a few functions missing. :)
    Some of these items are because the functions aren't in SV at all, others because they are not exposed to the API.
    You may be in luck with aliases as HypSetAliasTable will allow you to set the table, but not to turn aliases on and off.
    If you are in 11.x, you might also want to take a look at HypSetConnAliasTable. I think that will actually change the alias table for the currently defined connection.
    As for LROs, secondary buttons, and DTS, I think you are out of luck -- those items are not in SV so there are no corresponding functions.
    I had a mildly painful experience with SV VBA early last year -- there were quite a few bugs. I think at one point I had identified eight defects (this was the old esupport web site). If you are on 9.3.x, make sure you are as up to date as possible.
    Regards,
    Cameron Lackpour

  • Using VB API in VBA to edit the Calc Scripts

    Guys,
    Does anyone of you have VBA source code/examples utilizing Essbase API for the following operation.
    I want to copy Calc Script from Server to the client, edit the Script using VBA and copy back the Script to the Server. Any kind of info is appreciated.
    Thanks in advance
    HYPuser

    I posted some real sample code a while back for a completely different function (member renames).
    Renaming Existing Member Names
    So while you'll have to write the calc modification code yourself (or ask Glenn his rate ;-)), this at least shows you how the initialization / login / termination of the API would work. That's probably the most confusing aspect of using the VB API for the first time anyway.
    All that said, if this is from Excel and the user will already be logged in via the Excel Add-In, I believe that you can make life much easier and grab the hCtx directly without any initialization / login/ termination worries. I probably should have done that myself in the example I gave. See Tim Tow's posts in this thread:
    API
    EDIT: Two things I just noticed - first, the code sample I gave even has an example of polling for ProcState, so that gets you closer than I thought! Second, remembered that the line that reads...
    While ProcState.State ESB_STATE_DONE
    ...should actually have a 'less than / greater than' symbol between ProcState.State and ESB_STATE_DONE. Can't get the forum to display them correctly, even in code tags...
    Edited by: TimG on May 16, 2011 2:55 PM

  • How to launch Calc Scripts from Analyzer

    Hello all,Just wondering if that there is an easier way to launch calcs from analyzer... what are some of the ideas -using a executable lauch button, hyperlink, via Analyzer API? Any other ideas appreciated. regards, Ray

    This message has resolved my query by setting a larger MAX_PROPERTY_VALUE_LENGTH to "30"Thanks.I have come across this problem before. If it is the same problem it is to do with the length of your calc scripts. Obviously Essbase calc scripts are stored as .csc files, if these are too big Analyzer can't read them. This issue is caused by the ADM layer that Analyzer uses. Search on the server for a file called adm.properties .You should find the file in the following directory \\hyperion\analyzer\adm\lib .You may find you have more than one copy on the Server in which case edit them all. In the file find a string called MAX_PROPERTY_VALUE_LENGTH. You will find this is currently to 4 (this respresents 4kb). Increase the value to say 20. Save changes, restart Analyzer Service and hopefully this should have fixed the problem. I would love to know if this works. Paul Armitage. Analitica Ltd. www.analitica.co.uk

  • Maxl Automation for sequential calc scripts - just stops without giving any error

    Hi,
    I was running an automation for calculations using MaxL. by scheduling the Steps.bat in the task scheduler of windows.
    _________ Steps.bat ___________
    StartMaxl Steps.mxl
    _________ Steps.mxl ___________
    Login .....
    Sppol on to log.log
    Execute calculation 'DB'.'DB'.StepA1;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepA2;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepA3;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepA4;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepA5;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepA6;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepA7;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepA8;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepB1;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepB2;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepB3;           Iferror 'StopError';
    Execute calculation 'DB'.'DB'.StepB4;           Iferror 'StopError';
    define label 'StopError';
    exit;
    Not when I check the log file on execution it shows ...
    ___________________ Log.log _______________________
    MAXL> execute calculation 'DB'.'DB'.'StepA1';
    OK/INFO - 1012579 - Total Calc Elapsed Time for [StepA1.csc] : [173.87] seconds.
    OK/INFO - 1013274 - Calculation executed.
    MAXL> execute calculation 'DB'.'DB'.'StepA8';
    OK/INFO - 1012579 - Total Calc Elapsed Time for [StepA8.csc] : [2000.00] seconds.
    OK/INFO - 1013274 - Calculation executed.
    MAXL> execute calculation 'DB'.'DB'.'StepB1';
    OK/INFO - 1012579 - Total Calc Elapsed Time for [StepB1.csc] : [1200.00] seconds.
    OK/INFO - 1013274 - Calculation executed.
    MAXL> execute calculation 'DB'.'DB'.'StepB2';
    If you see the last line - it just halts - doesn't show any error or any other message. And the task in the windows task scheduler keeps showing the task as running - without any error there as well.
    Any ideas on why it is just going to a limbo (no sessions also appear on EAS console)
    Ankur

    Yes the script can be manually executed. Also if I again put a mxl file starting from the step where it last stopped - it continues execution normally. (i.e. executes StepB2 as well and continues executing)
    And today's execution result - I kept monitoring the server, it ran for 3hrs and then halts after around 80% of the steps with 20% were still remaining. I created a new Mxl to start from the last 20% and it ran successfully again.
    @Amarnath : Restart database ?
    I checked the logs - and this is what I can see (modified the big fields to show what the logs are showing)
    [Wed Oct  9 09:54:43 2013]Local/....... Ankur.....
    Calculation executed
    [Wed Oct  9 09:54:43 2013]Local/DB///47450147858752/Info(1013210)
    User [Ankur.....@Native Directory] set active on database [DB]
    [Wed Oct  9 09:54:43 2013]Local/DB/DB/Ankur......
    Received Command [Calculate] from user [Ankur......@Native Directory]
    [Wed Oct  9 09:54:43 2013]Local/DB/DB/Ankur......
    Received Command [Calculate] from user [Ankur......@Native Directory] using [StepB2.csc]
    [Wed Oct  9 10:24:59 2013]Local/DB///47341561242320/Info(1002035)
    Starting Essbase Server - Application [DB]
    [Wed Oct  9 10:24:59 2013]Local/DB///47341561242320/Info(1200480)
    Loaded and initialized JVM module
    [Wed Oct  9 10:24:59 2013]Local/DB//47341561242320/Info(1200445)
    External [GLOBAL] function [@ESSBASEALERT] registered OK
    [Wed Oct  9 10:25:01 2013]Local/DB//47341561242320/Info(1019008)
    Reading Application Definition For [DB]
    So indeed the essbase server is starting again - but why ?
    Ankur

  • MAXL problem for launching a script in order to disconnect users in a cube

    Hello,
    I would like to know how i can launch a maxl script in order to disconnect users who are connected on a cube. When i do this :
    IEssDomain dom2 = ess.signOn(USER, PASSWORD, false, null, PROVIDER);
    cv = dom2.openCubeView("EssaiBis", SERVEUR, APPNAME, CUBENAME);
    IEssMaxlSession maxl = dom2.openMaxlSession("maxl", SERVEUR);
    String strQuery = "alter application "+APPNAME+" unload database "+CUBENAME+";";
    maxl.execute(strQuery);
    maxl.close();
    The APPNAME, the CUBENAME, the SERVEUR, the USER, the PASSWORDn and the PROVIDER (embedded) are OK. However, it jumps the commands which are under the : IEssMaxlSession maxl = dom2.openMaxlSession("maxl", SERVEUR);
    So, the problem seems to be here.
    Thanks you for your help.
    Vinou

    It seems that it doesn't take the "+" in the script on the forum ^^

  • BEx VBA functions for Excel

    I have a requirement to create a WorkBook from a query that uses a hierarchy. It needs to have a couple of columns that use Excel formulas because there are user input cells that affect the formula. However when I expand or collapse the hierarchy the Excel formulas lose their reference (#REF!). Is there some existing VBA code to reset the worksheet formula references when the hierarchy is expanded or collapsed? Yes I'm using BEx Analyzer 3.5.
    Thank you!
    Al

    I used VBA in the WB as a solution.

  • SmartView VBA Commands - HypCreateConnection and HypConnect

    I am in the process of converting some spreadsheets with Essbase Excel add-in VBA macros to use the SmartView VBA functions. I am having trouble just doing the connect to the V11 database. Prior to the conversion I used the following command to connect to the database to access an Essbase version 6.5 database:
    sts = EssVConnect("MS Essbase Actual", EssUsername, EssPassword, "Ws-bco-ess1", "Crsfo09", "Crsfo09")
    I have migrated the database to Essbase version 11.1.1 (on another server) and am attempting to connect to it with the following command (Oracle Hyperion SmartView for Office, Fusion Edition):
    sts = HypCreateConnection("MS Essbase Actual", EssUsername, EssPassword, HYP_ESSBASE, "http://ws-tst-esswl:13080/aps/SmartView", "Ws-tst-ess3d", "Crsfo09", "Crsfo09", "CrsConnection", "Analytic Services Provider")
    This is failing with a status of -47. The User Guide for Oracle Hyperion SmartView for Office, Fusion Edition lists status codes up to -40. It appears to connect to Provider Services and bring up my Essbase servers, but not actually connect to a specific application/database.
    I am using Excel 2007.
    I am also confused about the difference between HypCreateConnection and HypConnect. Do you need to use both, and if so, in which order? I found an article about Customizing Smart View Worksheets by using the VBA Toolkit, but it makes no mention of HypCreateConnection (and instructions seem to be for Excel 2003), so it wasn't very helpful.
    Thanks!

    OK... I'm still struggling with this. I keep getting a -47 error on the HypCreateConnection line, which according to the docs says that the connection already exists. So I added commands to try to remove the connection prior to creating it if one already exists. Here is my code:
    X = HypIsConnectedToAPS()
    If X = True Then
    X = HypDisconnectFromAPS()
    End If
    X = HypConnectionExists("SampBasicConn")
    If X = True Then
    X = HypRemoveConnection("SampBasicConn")
    End If
    X = HypCreateConnection(Empty, "admin", "password", HYP_ESSBASE, "http://apsserver:13080/smartview/SmartView", "essserver", "Sample", "Basic", "SampBasicConn", "Analytic Provider Services")
    X = HypConnectionExists("SampBasicConn")
    If X = True Then
    X = HypConnect(Empty, "admin", "password", "SampBasicConn")
    End If
    Return codes are all expected (sometimes I have to disconnect from APS and sometimes not) until I hit the HypCreateConnection line. The HypConnectionExists always returns false, but HypCreateConnection returns -47. After that, I test for the connection again, and it returns false. So why am I getting a -47? Also, there is no connection. It is truly acting as though the HypCreateConnection is failing. But the error code is not helpful. Is there any way to tell what is causing the failure? It seems I have tried all permutations of "/aps/SmartView", "/smartview/SmartView", fully qualified server names, etc. Is there a way to tell what is causing the failure (bad username/password, bad APS URL, bad Essbase server, bad application/database, etc.)?

  • Is there exist Str to num ifunction n BSO calc script

    Hi all,
    Do we have any function in Essbase calc script for BSo
    Iam using in ASO
    StR to Num
    Num to Str
    same function I need in bso
    Which functions can i use insted of this in BSO
    Any help would be appriciated

    There are no functions that do that. The closest you could get is the @member what will turn a value into a member name. For the functionality you want, you would have to use a Custome Defined Function (CDF). If this is for comparison, there is one already created at https://codesamples.samplecode.oracle.com/servlets/tracking/action/ExecuteQuery?query=essbase1
    You will have to log in to get there

  • Launching Shell Scripts

    Would like some pointers on designing a Asynchronous (JMS )component for launching shell scripts.

    Use Runtime and Process calss and make system calls.

  • Order Partner Functions for VENDORs

    Hi All,
    We are using CRM 5.0 and ECC 6.0. We successfully replicated all the VENDORs from ECC to CRM BPs with BBP000-VENDOR role as this features is supported from CRM 5.0.
    We are now trying to get the VENDOR Partner functions replicate from ECC sales order to the Partner Functions for the CRM ORDERS. Looks like SAP doesn't support this feature yet. I am getting the Partner Functions (say Z1 - Freight Carrier ) but the partner data is BLANK. So i am working on a workaround.
    My Issue I am using ORDER_SAVE BADI to enter a BP from CRM to this Partner Function that is coming empty to CRM. For some reason my code is not working. Below is my code
    Data declarations for VENDOR Partner Function*********
      data: lt_partner_ref           type CRMT_PARTNER_EXTERNAL_WRKT,
              ls_partner_ref          type CRMT_PARTNER_EXTERNAL_WRK,
              lt_partner                type CRMT_PARTNER_COMT,
              ls_partner               type CRMT_PARTNER_COM,
              lt_partner_act          type CRMT_PARTNER_COMT,
              lt_partner_attributes type CRMT_PARTNER_ATTRIBUTE_COM_TAB,
              ls_partner_attributes type CRMT_PARTNER_ATTRIBUTE_COM.
      data:lt_header_ref   type crmt_object_guid_tab,
             guid                type crmt_object_guid.
      guid =  iv_guid.
      insert guid into table lt_header_ref .
      call function 'CRM_ORDER_READ'
        EXPORTING
          it_header_guid       = lt_header_ref
        IMPORTING
          et_partner            = lt_partner_ref                 
        EXCEPTIONS
          document_not_found   = 1
          error_occurred            = 2
          document_locked       = 3
          no_change_authority  = 4
          no_display_authority  = 5
          no_change_allowed   = 6
          others                      = 7.
    Start of the code to VENDOR PARTNER FUNCTIONS for ORDER Heafer/Item ***********
        Read table lt_partner_ref into ls_partner_ref with key partner_fct = 'Z0000007'.
        if ( sy-subrc = 0 ).
            ls_partner-kind_of_entry = 'C'.
            ls_partner-partner_fct = 'Z1'.
            ls_partner-partner_no = '0010060331'.
            ls_partner-display_type = 'BP'.
            ls_partner-no_type = space.
            ls_partner-REF_HANDLE = '100'.
            INSERT ls_partner INTO TABLE lt_partner.
            ls_input_names-fieldname = 'KIND_OF_ENTRY'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'PARTNER_FCT'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'PARTNER_NO'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'DISPLAY_TYPE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'NO_TYPE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_names-fieldname = 'REF_HANDLE'.
            ls_input_names-changeable = ' '.
            INSERT ls_input_names INTO TABLE ls_input_field-field_names.
            ls_input_field-ref_guid = ls_partner_ref-ref_guid.
            ls_input_field-objectname = 'PARTNER'.
            ls_input_field-ref_handle = '100'.
            ls_input_field-logical_key = '0000'.
            ls_input_field-ref_kind = 'B'.
            INSERT ls_input_field INTO TABLE lt_input_field.
          Endif.
      call function 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_partner           = lt_partner                         "I added this for VENDOR PF
        CHANGING
          ct_input_fields   = lt_input_field
        EXCEPTIONS
          error_occurred         = 1
          document_locked    = 2
          no_change_allowed = 3
          no_authority           = 4
          others                   = 5.
    endmethod.
    Could anyone check my code and suggest any changes?
    Thanks,
    Karuna.

    Hi ROshan,
      Open customer master in XD02  sales view and save it then check in XD03 it should display the partner functions.
    As you said the account group has been changed I think the records needs to be saved again.

  • What is the procedure/code in VBA for passing the calc scripts dynamically based on the selection.

    Hello Gurus,
    I want to know what is the procedure/code in VBA for passing the calc scripts dynamically based on the selection.
    For example:
    X=EssVCalculate("Sheetname","Calc_Script name",True)
    In the above code instead of the *"Calc_Script name"* I want a script which is called dynamically and the values are calculated accordingly.
    Thanks in advance
    Saurabh

    Hi Todd,
    This is the situation:
    I have a calc script in Essbase which I can call to perform the calculations on the current sheet that is retrieved. I want calculation for the following formulas:
    x = EssVCalculate("Sheet2", "CalcBC", False)
    CalcBC is my calc script which is present in Essbase
    So instead of passing the above script I want to pass the conditions dynamically in the VBA code . I don't want to mention the script name directly in EssVCalculate option
    For example:
    I have three drop down menus from which I would select three different( zero level )members. It would then retrieve the data for that particular values in the excel sheet and now when I click on Calculate button it should calculate the script dynamically.
    I don't know how calc scripts can be executed dynamically in the VBA code itself.
    Thanks in Advance
    Saurabh

  • HI John: Advise for Business Rule or Calc Script

    Hi John,
    I need your Advice regarding Business Rule as earlier i took all ur advice seriously and also succeeded; This is toughest area for me.
    1) Any useful document which help me to understand Business Rule apart from HBR admin pdf ?
    1) Any Blog/Source/PDF/PPT especially for Planning Business Rule ?
    Thanks for any Help.
    Regards
    N Kumar

    Hi,
    Well business rules are really just calc scripts with a few additional features.
    So to understand business rules a good place to start is looking at calc script functions and commands, the essbase technical reference includes details on all this :- http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/techref.htm
    If you get stuck on calc scripts then the essbase forum is also a good place to ask for advice as there are many experts on there.
    I have not seen many sources for information relating to just business rules.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Need Assistance for VBA function in oracle how to implement

    My very respected and Senior, regards,
    Sir, hope you will in best of health and wealth by the grace of God,
    Sir, i have a request problem as i m very junior against you and you have passed this time before many years ago as i m standing where. Sir i m a very junior developer of oracle and have a problem putting on your desk with the hope that you can help my as a boss.
    Sir me have to calculate yield of Bond using oracle form
    i have tried my best and tired
    there is a formulae in excel which give the Yield() when we provide the parameters
    and i need the excel formulae or the oracle calculation code of PLSQL for this.
    How can i get yield when i have price, coupon rate, frequency, issue and maturity of the coupon , coupon period , next coming coupon , and others detail.
    or tell me how to use EXCEL VBA for this problem ,
    thnx n regards,
    yours student, junior developer youngest brother
    Faraz
    How can I get the solution using Excel VBA function with oracle
    so that move values to excel calculate them and copy the result from excel to oracle forms

    Hi,
    for the Hex-Number-conversion see:
    [url http://psoug.org/snippet/Convert-Hex-to-Decimal-Decimal-to-Hex_78.htm] self-defined Conversion-Functions
    What number format do you have? YYYMMDD
    Or is there a Date corresponding to 1 and a number n represent the date n-1 days after day 1?
    Please describe further.
    Bye
    stratmo

  • A method for passing in the system date to either a substitution variable or directly into a calc script for use on the fix statement

    Does anyone have an idea of how to pass in the server system date into a calc script or into a substitution variable so that I can fully automate my calc script to only calculate the current day? Thanks very much for any assistance on this.

    unsure why cannot att bat<BR>below is raw code meant to insert into .bat file<BR>================================================<BR><BR>code starts below this line<BR>================================================<BR>:: <BR>:: pls ensure essbase server up and running <BR>:: batch file to upd subs var <BR>:: insert correct values below<BR>:: <BR>:: substitution variables set up in cube: curryr, lastyr <BR>:: substitution variables set up in cube: currmth, prevmth ... <BR>::<BR><BR>:: setting of local env vars<BR>setlocal<BR>::<BR><BR>:: setting of job control vars<BR>set svr=<< insert value here >><BR>set uid=<< insert value here >><BR>set pwd=<< insert value here >><BR>::<BR><BR>:: setting of date and time vars<BR>for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (<BR>set dayofweek=%%i<BR>set day=%%k<BR>set month=%%j<BR>set year=%%l<BR>set datestamp=%%l_%%j_%%k<BR>)<BR>for /F "tokens=1-2 delims=: " %%i in ('time /t') do (<BR>set hour=%%i<BR>set minute=%%j<BR>set timestamp=%%i_%%j<BR>)<BR>::<BR><BR>:: setting year vars<BR>set /a curryr=%year%<BR>set /a lastyr=(%year% - 1)<BR>::<BR><BR>:: setting paths and files<BR>set destpath=<< insert path here >><BR>set errpath=<< insert path here >><BR>set errfiles=%errpath%\*.err<BR>set errfiledir=%errpath%\%datestamp%_%timestamp%_err.dir<BR>set errfile=%destpath%\%datestamp%_%timestamp%_err.err<BR>set logfile=%destpath%\%datestamp%_%timeStamp%_log.log<BR>set upd_var_file=%destpath%\upd_var.txt<BR>::<BR><BR>:: initial housekeeping<BR>if exist %errfile% del %errfile%<BR>if exist %logfile% del %logfile%<BR>if exist %upd_var_file% del %upd_var_file%<BR>if exist %errfiledir% del %errfiledir%<BR>::<BR><BR>:: start all<BR>echo. >> %logfile%<BR>echo rem &0 >> %logfile%<BR>echo. >> %logfile%<BR>echo rem --- start all --- >> %logfile%<BR>date/t >> %logfile%<BR>time/t >> %logfile%<BR><BR>:: dates<BR>echo rem --- dates --- >> %logfile%<BR>echo Curr Year = %curryr% >> %logfile%<BR>echo Last Year = %lastyr% >> %logfile%<BR><BR>:: gen temp txt to upd subs vars<BR>echo rem --- upd subs vars start --- >> %logfile%<BR>echo. >> %upd_var_file%<BR>echo. >> %upd_var_file%<BR>echo login "%svr%" "%uid%" "%pwd%"; >> %upd_var_file%<BR>if %month% == 01 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Dec"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Nov"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>if %month% == 02 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jan"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR> echo updatevariable "CurrYr" "%svr%" "" "" "FY%curryr%"; >> %upd_var_file%<BR> echo updatevariable "NextYr" "%svr%" "" "" "FY%nextyr%"; >> %upd_var_file%<BR> echo updatevariable "NextY2" "%svr%" "" "" "FY%nexty2%"; >> %upd_var_file%<BR> echo updatevariable "LastYr" "%svr%" "" "" "FY%lastyr%"; >> %upd_var_file%<BR> echo updatevariable "LastY2" "%svr%" "" "" "FY%lasty2%"; >> %upd_var_file%<BR> echo updatevariable "LastY3" "%svr%" "" "" "FY%lasty3%"; >> %upd_var_file%<BR> echo updatevariable "PrevYr" "%svr%" "" "" "FY%lastyr%"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Dec"; >> %upd_var_file%<BR>)<BR>if %month% == 03 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Feb"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jan"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR> echo updatevariable "PrevYr" "%svr%" "" "" "FY%curryr%"; >> %upd_var_file%<BR>)<BR>if %month% == 04 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Mar"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Feb"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q1"; >> %upd_var_file%<BR>)<BR>if %month% == 05 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Apr"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Mar"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 06 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "May"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Apr"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 07 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jun"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "May"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q2"; >> %upd_var_file%<BR>)<BR>if %month% == 08 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Jul"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jun"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 09 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Aug"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Jul"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 10 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Sep"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Aug"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q3"; >> %upd_var_file%<BR>)<BR>if %month% == 11 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Oct"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Sep"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>if %month% == 12 (<BR> echo updatevariable "CurrMth" "%svr%" "" "" "Nov"; >> %upd_var_file%<BR> echo updatevariable "PrevMth" "%svr%" "" "" "Oct"; >> %upd_var_file%<BR> echo updatevariable "CurrQtr" "%svr%" "" "" "Q4"; >> %upd_var_file%<BR>)<BR>echo. >> %upd_var_file%<BR>echo exit; >> %upd_var_file%<BR><BR>:: run temp txt to upd subs vars <BR>esscmd %upd_var_file%<BR>echo rem --- update subs vars end --- >> %logfile%<BR> date/t >> %logfile%<BR> time/t >> %logfile%<BR><BR>:: end all<BR>echo rem --- end all --- >> %logfile%<BR> date/t >> %logfile%<BR> time/t >> %logfile%<BR><BR>: end_all<BR>endlocal<BR><BR>===============================<BR>

Maybe you are looking for