0
SET USER=3092870062612032450309212768828033911960
SET PW=  11924680696448007706606097772500386367703037421296151222544191726011595198996750

FOR /f "eol=; tokens=1,2 delims=, " %%i in D:\Hyperion\Automation\MaxL\subvar.var do echo
alter database %%j.%%k set variable %%i %%l; | essmsh -s Localhost -l
3092870062612032450309212768828033911960 11924680696448007706606097772500386367703037421296151222544191726011595198996750 -i

I am in the process of automating substitution variables in our ASO cube. I have prepared subvar.var file which contains the variables. Is there a way to read them through MaxL and update the cube dynamically?

I tried using the above code and it is returning error.

Subvar.var file:
OPS OPS lastmth Jun 2015
OPS OPS currmth Jul 2015

almightyGOSU
  • 3,731
  • 6
  • 31
  • 41
ajay k
  • 59
  • 6
  • What's the error you're getting? It looks like you're pretty close to having the solution although I see a couple of potential issues. – jwj Jul 18 '15 at 06:54
  • its throwing invalid arguments error while running the maxl script – ajay k Jul 20 '15 at 16:11
  • @jwj this is the error which is thrown now. 706606097772500386367703037421296151222544191726011595198996750 on Localhost; "" OK/INFO - 1051034 - Logging in user [admin@Native Directory]. OK/INFO - 1241001 - Logged in to Essbase. MAXL> FOR /f "eol=; tokens=1,2 delims=, " %%i in "hyperion/Automation/MaxL/subva r.var" do echo 2> alter database %%j.%%k set variable %%i %%l; ERROR - 1242021 - (1) Syntax error near ['FOR']. 3> 4> essmsh error: End of File breaks the statement – ajay k Jul 20 '15 at 18:57
  • It looks like somehow the FOR loop from the batch file is being piped to the MaxL interpreter, causing the syntax error. What about simplifying things and just passing parameters to essmsh to run a script that references those parameters? So you'd have alter database $1.$2 in the .msh file that gets run? It seems a bit cleaner. Piping commands directly to the interpreter is technically supported but has always seemed clumsy at best. – jwj Jul 20 '15 at 19:43
  • @jwj Thanks for the response. I tried the way you mentioned and still Error: MAXL> "" OK/INFO - 1051034 - Logging in user [admin@Native Directory]. OK/INFO - 1241001 - Logged in to Essbase. MAXL> alter database %%j.%%k set variable %%i %%l; ERROR - 1242021 - (1) Syntax error near ['%']. MAXL> | essmsh -s Localhost -l 2> 3092870062612032450309212768828033911960 119246806964480077066060977725003 86367703037421296151222544191726011595198996750 -i essmsh error: End of File breaks the statement – ajay k Jul 20 '15 at 20:06
  • @jwj atch Script Portion reading variables and calling maxl FOR /f "eol=; tokens=1,2 delims=, " %%i in ('D:\Hyperion\Automation\MaxL\subvar.var') do echo Cmd/c D:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\startMaxl -D D:\Hyperion\Automation\MaxL\subvar.mxls 1367587,27237271 REM Pause – ajay k Jul 20 '15 at 20:07
  • @jwj Maxl portion: /*Logging in Admin User to current server*/ login $key 3092870062612032450309212768828033911960 $key 11924680696448007706606097772500386367703037421296151222544191726011595198996750 on Localhost; alter database %%j.%%k set variable %%i %%l; | essmsh -s Localhost -l 3092870062612032450309212768828033911960 11924680696448007706606097772500386367703037421296151222544191726011595198996750 -i – ajay k Jul 20 '15 at 20:07
  • You can't refer to the batch variables as %%j from inside the MaxL script. You need to pass the variables to the MaxL script, and then you can refer to them as $1, $2, and so on. You're on the right track but seem to be confusing MaxL and batch. – jwj Jul 21 '15 at 16:40

0 Answers0