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
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...
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.
* 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.
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.
Edited by: ss1988 on Feb 27, 2013 5:33 AM
Edited by: ss1988 on Feb 27, 2013 5:36 AM