Maxl statement for substitution variable..
Friends,
Do we have a maxl command that will return substitution variables at the server level along with their values.
This would help us do a quick check of the system at all environments using VLOOKUP before the cycle starts..
The manual check seems boring :(
Thanks,
RN.
Sir, I love the way u write your blogs :)
this blog was just awsome with the conversation with JJ explaining with such details..^^^Thank you for your kind words. It really makes my day when I hear that people get real value out of my blog. But to be honest, I am but a conduit for Jason's knowledge. :)
Regards,
Cameron Lackpour
P.S. You should check out his death-to-Load-Rules post. Very cool stuff.
Similar Messages
-
MaxL statement for substitution variables
Hi,I'm trying get a script together that changes all my substitution variables, and I'm able to do this using:alter database application.database set variable string;but how do I set the substitution variables for (all apps) and (all dbs)?Any help appreciated.ThanksSunil
I don't think MaxL is going to do this for you, although you could always use a positional parameter to set the value.
I'm not a big fan of passing the system date to an Essbase process as it so often varies from the data date.
Usually, I create an external scripting process (in my case, in the past, usually VBScript, I would probably tilt towards perl now) that read the file, found the year and month, and then called the MaxL with parameter lne variables to set the Substitution Variables. This is not fancy code -- the error checking is the majority of the work.
Regards,
Cameron Lackpour -
Error When Prompting for Substitution Variable
Hi - I'm receiving an error when I try to run the following using the substitution variable - but only when I enter a string; when I enter a numeric value it runs fine.
DECLARE
l_SCR_Info VARCHAR2(50) := '''SCR'||&SCR_NUM||'-'||'''';
begin
dbms_output.put_line(l_SCR_Info);
end;Here is the error I receive when I supply a string value when prompted:
ORA-06550: line 3, column 52:
PLS-00201: identifier 'AB' must be declared
ORA-06550: line 3, column 27:
PL/SQL: Item ignored
ORA-06550: line 10, column 22:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 10, column 1:
PL/SQL: Statement ignoredCan anyone shed some light on what I'm missing here?
Thanks!
ChristineHi,
It looks like you just want one string there:
l_SCR_Info VARCHAR2(50) := '''SCR&SCR_NUM-''';Remeber how substitution variables work: SQL*Plus replaces them with values before sending the code to the back end to be compiled.
If you give a value like AB for the variable, the code you posted is equivalent to:
l_SCR_Info VARCHAR2(50) := '''SCR'|| AB ||'-'||'''';by the time it reaches the compiler. AB is not inside quotes, so the compiler looks for a variable or function called AB.
If you gave a number:
l_SCR_Info VARCHAR2(50) := '''SCR'|| 123 ||'-'||'''';there's no problem; the compile knows what the literal number 123 is. -
2.1 EA1 Bug No promt for substitution variables
Didn't see a post for this yet. In this release, I am not being prompted for replacement variables when I use & in my query.
SELECT &1 from dual;
ORA-01008: not all variables bound
01008. 00000 - "not all variables bound"
*Cause:
*Action:
SELECT &&1 from dual;
ORA-01745: invalid host/bind variable name
01745. 00000 - "invalid host/bind variable name"
*Cause:
*Action:Substitution variables have to be defined:
define 1 = 'Defined'
select '&1' from dual;A current 2.1 EA1 bug will let you only execute this as script (F5).
Bind variables have to be given through the dialog:
select ':1' from dual;A current 2.1 EA1 bug will let you only run this as statement (F9).
To the development team:
Please log the bug that bind variables can't be used when executing as script.
Regards,
K. -
MAXL to update substitution variable
I want to confirm that using the MAXL statement to alter a substitution variable that is not specific to any APP or any DB will not work.
In other words, the MAXL statemet to alter a substitution variable will only work if that variable is assigned to an app and and DB..
ThanksDoesn't "alter +system+ set variable..." work?
-
Prompted for Substitution Variable at Startup?
Ever since I've been on version 1.2.0.29.98, when I start up SQL Developer and attempt connection to one of my databases, I get a modal popup window titled "Enter Substitution Variable" with OK and Cancel buttons. The name of the substitution variable I'm prompted for is GNAME.
I have a couple of different Oracle homes on my machine, and I recognize gname as a lexical parameter I use in "login.sql" scripts for SQL*Plus (see http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:446220075876). Can you tell me from where SQL Developer might be picking up this lexical parameter for which it insists on substituting a value? The popup is annoying, and I'd prefer to make it go away.
At first I thought it may have been due to a login.sql I have that lives in the same directory as the one I specified containing SQL*Plus (Tools -> Preferences; SQL*Plus -> SQL*Plus Executable), but even after I rename that login.sql's filename, the GNAME substitution persists.
Thank you.
Windows XP SP 2
SQL Developer 1.2.0.29.98
Database 9.2.0.6Someone else asked the same thing this morning:
Replacement Variables/Column formatting in SQL*Developer
At the moment, sqldev tries executing a "login.sql" from the Script Directory. If that doesn't exist, he looks for it in the sqlplus path. No other possibilities nor preferences.
K. -
MaxL statement for Authentication
We use this statement to convert our users to External Authentication:alter user USERNAME set type external ;But I couldn't find out the syntax for converting users to native authentication again.Can anyone help me?Thanks,Zuri
Sir, I love the way u write your blogs :)
this blog was just awsome with the conversation with JJ explaining with such details..^^^Thank you for your kind words. It really makes my day when I hear that people get real value out of my blog. But to be honest, I am but a conduit for Jason's knowledge. :)
Regards,
Cameron Lackpour
P.S. You should check out his death-to-Load-Rules post. Very cool stuff. -
Hi
Is there a way to display a list of ASO apps only using Maxl?got it, there is a column storage type.
-
Multiple members in a substitution variable
<p>Hi,</p><p> </p><p>I use substitution variables in Planning forms to choose wichyear to display. I would like to have FY06, FY07 andFY08 in the same variable. I just tried to add it in AAS(separeted by commas) and there is no problems, but when I open myPlanning form, I got this error : "</p><center><table style=" margin-bottom: 2px; margin-right: 75px; margin-left: 75px; margin-top: 2px;" border="0" id="bannerMsg" cellspacing="0"cellpadding="0"><tr><td align="left" valign="center" class="verysmalltext">Asubstitution variable required for this calculation is undefined.Variable: RFFcstYears</td><td style=" padding-top: 5px; padding-bottom: 0px; padding-left: 5px; padding-right: 0px;" valign="center"><img title="Close" src= "http://malbicl01a:8300/HyperionPlanning/ui_themes/tadpole/images_global/task_tabs_close_sel.gif" onclick="hideBannerMessage()"></td></tr></table></center><p>If I change it for FY06 only, all works fine.</p><p> </p><p>I don't want to use 3 variables as some times we will need only2 years (it's a rolling forecast over a 18 monhs period).</p><p> </p><p>Any ideas how to set the variable ?</p><p> </p><p>Thanks</p>
Hi,
You cannot provide multiple values to single substitution variable. If you want that a variable can contain multiple values then you can use User Variable.
Request you to please look into the below links
for Substitution variable - http://docs.oracle.com/cd/E17236_01/epm.1112/hp_admin/frameset.htm?ch07s05.html
For user variable- http://docs.oracle.com/cd/E17236_01/epm.1112/hp_admin/frameset.htm?ch07s05.html
Hope this helps.
Regards
SST.....
Edited by: ss1988 on Mar 9, 2013 11:14 PM -
Substitution variables (DEFINE)
First of all : thanks for this product!!!
It would be appreciated to have the possibility of DEFINEing substitution variables in SQL scripts and to call scripts with their parameters.
Thanks in advance.
nullIn iSQL*Plus 9.2 there is a subtle interaction
between the iSQL*Plus interface and SQL*Plus engine
code. Both do some parsing for substitution
variables. See:
http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/server.920/a90842/ch6.htm#1007141
In your example I would remove the DEFINE 'x' and 'y'
variables and just use '&user' and '&password'
everywhere in your script.
-- CJ -
Isql*plus 9.2 problem: Substitution variables
hi, i'm new to using isql*plus.
i have written the following script to setup my the structure of a database, it works but when i execute it it asks me to:
Substitution Variables
Enter values for substitution variables in the script to execute:
Variable Value
d
I cant work out why, please help.
here's the script:
--author: daniel smith
--student number: 2235592
--date: 17/02/2005
--isql plus
--Application Development and Database (AD&D)
--Assessment 3
--drop existing tables
drop table expense;
drop table sess;
drop table assignment;
drop table task;
drop table stage;
drop table project;
drop table task_type;
drop table employee;
drop table grade;
--create new tables
create table grade
grade_no number(6) primary key,
description varchar2(50),
rate_per_hour number(5,2)
create table employee
employee_no number(6) primary key,
surname varchar2(50),
first_name varchar2(50),
grade_no number(6),
foreign key (grade_no) references grade(grade_no)
create table task_type
task_type_no number(6) primary key,
description varchar2(50),
grade_no number(6),
foreign key (grade_no) references grade(grade_no)
create table project
project_no number(6) primary key,
project_code varchar2(50),
client varchar2(50),
description varchar2(50),
manager number(6),
foreign key (manager) references employee(employee_no)
create table stage
project_no number(6),
stage_no number(6),
description varchar2(50),
Start_date date,
planned_Duration number(6,1),
fees_basis varchar2(2),
primary key (project_no,stage_no),
foreign key (project_no) references project(project_no),
constraint fees_basis_ck check(fees_basis IN ('fq','vs','vn','cs','cn'))
create table task
project_no number(6),
stage_no number(6),
task_no number(6),
description varchar2(50),
estimated_hours number(6,2),
planned_start_date date,
max_duration number(6,2),
task_type_no number(6),
primary key (project_no,stage_no,task_no),
foreign key (project_no,stage_no) references stage(project_no,stage_no),
foreign key (task_type_no) references task_type(task_type_no)
create table Assignment
project_no number(6),
stage_no number(6),
task_no number(6),
employee_no number(6),
estimated_hours number(6),
primary key (project_no,stage_no,task_no,employee_no)
create Table Sess
Session_no number(6),
Session_date date,
actual_Hours number(6),
chargeable char(1),
project_no number(6),
stage_no number(6),
task_no number(6),
employee_no number(6),
primary key (Session_no),
Foreign key (project_no, stage_no, task_no, employee_no)
references Assignment(project_no, stage_no, task_no, employee_no),
constraint chargeable_sess check(chargeable IN ('y','n'))
create table expense
expense_no number(6),
description varchar2(50),
quantity number(4),
unit_cost number(4,2),
chargeable char(1),
project_no number(6),
primary key(expense_no),
foreign key(project_no) references project(project_no),
constraint chargeable_exp check(chargeable IN ('y','n'))
**********************************************************<< ..
<< --Application Development and Database (AD&D)
<< --
take the '&' off your script,
oracle thinks you want to define variable D,
and obviously you don't want that -
MAXL Script for copying outline
Can we write any MAXL Script for copying outline from one aplication/datbase to another application/database.
Example copying olt from app1.dbb1 to app2.dbb2No and yes.
There is no MaxL statement for copying an outline from one DB to another (Unless you are converting from BSO to ASO). But you can shell system commands like xcopy within a MaxL script (of course you could just do this in your batch or shell script) . Just make sure you stop the Dbs before doing the copy -
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>
-
MaxL Pass parameter zu create substitution variable
Hi everybody,I'm trying to pass a parameter from a DOS batch file to a MaxL script to create a substitution variable with that parameter.DOS batch file:...set var_version = "Final Version"essmsh Test.msh %var_version%MaxL file:....alter application TEST set variable SUBST_VERSION $1=> the substitution variable should be "Final Version" (incl. double-quotes because of the whitespace in the variable's value), but in fact, the substitution variable will be "Final" (without any double-quotes; they have been stripped by MaxL!?)=> if I don't use a parameter it works:alter application TEST set variable SUBST_VERSION '"Final Version"'=> I tried the following statement to keep my double-quotes, but the parameter won't be expanded then:alter application TEST set variable SUBST_VERSION '"$1"'So, does anybody know how to pass a parameter containing whitespaces to create a substitution variable within a MaxL script?Thanks for your hints!Marc
Hi,Try this one:1. Create batch file which will produse you a whole MAXL statement. This can be done with > or >> statement at the end of the commanad.E.g.: whole_command_with_"Final" >> to file.txt2. Execute maxl with above generated file.Hope this helps,Grofaty
-
Can we use Substitution variables in MAXL?
Hi,
Can we use substitution variables in MAXL script?
I have to run this MAXL command for clearing a slice of ASO cube on V11.1.1.3.
alter database Apname.DBname clear data in region 'CrossJoin({[2009]},{[Dec]})';
I am planning to use Current_year & Current_month variables instead of hardcoding 2009 & Dec as I have to use this everymonth to clear the current months data.
If it is allowed, what is the syntax?
Is there any alternative apart from substitution variables?
Appreciate your thoughts.
Thanks,
-Ethan.You would just use ampersand and the variable name instead of the hard coding e.g. &yearVar &periodVar.
Not tried it on aso clears but in theory it should work as ...'CrossJoin({&yearVar},{&periodVar})';
just change yearVar and periodVar for your substitution variable names.
Cheers
John
http://john-goodwin.blogspot.com/
Maybe you are looking for
-
What is the creator code for final cut pro x?
Final Cut Pro 7 has creator code "KeyG" but the trial for FCP X has creator code "????" (according to the .plist). Does the full version use "KeyG" like previous ones, or a new code? Thanks Marc
-
Dear All i have a Business Rule callingin BPEL Process based on below XSD file <?xml version="1.0" encoding="windows-1256" ?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.bank.com/bankbpel" targetNamespace="http://www.ba
-
HT201198 Who to contact in regards to "invalid product serial number"?
I have both my Serial No. and Reg No. but when I type them in, it tells me I have the wrong serial number. It can't be wrong I've entered it multiple times and it is clearly labelled "serial number" on the box and the receipt. Who should I contact?
-
EM - Problens after Installation.
Hola ! I've just installed OMS Grid 10.2 and When I try to open the page a received the message :"PAGE CAN NOT BE FOUND". In some posts here, I've found that I must start DBconsole, but I' tried this and receive this message :OC4J Configuration issue
-
Pressing tab in a bulleted list
Whenever I press tab within a line inside a bulleted list it moves the entire line, not just the section that I want to move over. Is this behaviour normal? Is there a way to change this behaviour? Thanks