6 Replies Latest reply: May 8, 2013 12:47 AM by user12085382 RSS

    Runtime variables in essbase

    Pahul S.
      Hi ,

      We want to pass variables while execution, so that we can reduce number of scripts. For example, we have more than 30 different aggregation scripts for different combinations of scenarios and versions to aggregate. We want to reduce this and make only 1 script for aggregation and pass values at runtime. In this way we can pass any scenario and version combination while script execution.
      Please let me know if there is a way to do that?

      I am also trying to execute maxl script from server.
      I am able to execute commands such as login, set timestamp, display variable etc but when i execute below command, its giving me error:
      essmsh timestamp: Mon Feb 25 11:58:10 2013
      MAXL> Alter Database NewFCST.NewFCST set variable 'CurrYr' "'FY12'";
      ERROR - 1051083 - Substitution variable NewFCST.NewFCST.CurrYr does not exist.
      essmsh timestamp: Mon Feb 25 12:00:02 2013
      MAXL> iferror 'Errhandler';

      whereas it shows me 'CurrYr' variable while i execute Display variable command.

      Many thanks in advance
        • 1. Re: Runtime variables in essbase
          JohnGoodwin
          Are you sure the variable is definitely assigned against the database, it could exist but be an application or global level.

          Cheers

          John
          http://john-goodwin.blogspot.com/
          • 2. Re: Runtime variables in essbase
            ss1988
            Hi,

            The variable "CurrYr" what you have created, is it applicable for that particular application "NewFCST" and particular database "NewFCST" or is it applicable for all applications and all database.

            One of the reason of this error (1051083 - Substitution variable NewFCST.NewFCST.CurrYr does not exist) is that we created the variable for single application but in MaxL script we try to update it for all application or that variable is created for all applications and we try to update it for particular application.

            If the variable is applicable for all application and all database, please try this MaxL script to update a variable
            alter system set variable 'CurrYr' "'FY12'";

            If the variable is applicable for particular application and particular database then script is
            Alter Database NewFCST.NewFCST set variable 'CurrYr' "'FY12'";

            Hope this helps...

            Regards
            SST.....
            • 3. Re: Runtime variables in essbase
              Pahul S.
              Yes John,

              Variables are defined at server level. All variables are defined for all databases and all application.
              • 4. Re: Runtime variables in essbase
                Pahul S.
                Hi SST,

                Yes, I tried alter system set variable 'CurrYr' "'FY12'"; and it worked fine. We have defined variables as "all databases" and "all applications". Still I am confused why Alter database is not working.


                Can you please suggest a way in which we can automate scripts and pass variables at execution time.

                Thanks
                • 5. Re: Runtime variables in essbase
                  ss1988
                  Hi,

                  * Still I am confused why "Alter database" is not working. *

                  Sir, Alter database command Changes database-wide settings for the particular application and by using it you are trying to change the variable value which is defined for all application and all databases.
                  http://docs.oracle.com/cd/E12032_01/doc/epm.921/html_techref/maxl/ddl/statements/altdb.htm

                  Alter database is going to work when the substitution variable is created for that particular application and its database, at that time alter database is working fine.(Alter Database NewFCST.NewFCST set variable 'CurrYr' "'FY12'").

                  * Can you please suggest a way in which we can automate scripts and pass variables at execution time. *

                  You can pass the Variable values in a text file and in a batch file you can call the that text file and MaxL file where you have written the login command and alter system/ database command to update the value according to the test file.

                  Hope this helps.

                  Regards
                  SST.....

                  Edited by: ss1988 on Feb 27, 2013 5:33 AM

                  Edited by: ss1988 on Feb 27, 2013 5:36 AM
                  • 6. Re: Runtime variables in essbase
                    user12085382
                    You should be able to do what you want with the new 11.1.2.3 features.

                    https://blogs.oracle.com/proactivesupportEPM/entry/epm_11_1_2_31

                    Regards,
                    GR