tag:blogger.com,1999:blog-7650953985627040991.post1617592560106213657..comments2024-02-14T05:30:55.538-05:00Comments on Cameron's Blog For Essbase Hackers: Stupid Programming Tricks #16 -- Special characters in Substitution Variables with MaxLCameron Lackpourhttp://www.blogger.com/profile/07701786303677521318noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-7650953985627040991.post-73912264051487960002013-09-05T10:22:59.216-04:002013-09-05T10:22:59.216-04:00Sachin,
I agree, use the better flexibility of wh...Sachin,<br /><br />I agree, use the better flexibility of whatever batch language you are using (powershell, VBscript, DOS, whatever) to set the substitution variable to whatever you need and go from there.<br /><br />Here's a Network54 thread on a way to set quotes and double quotes to MaxL (not substitution) variables: http://www.network54.com/Forum/58296/thread/1274327761/substitution+variables+setup+issue<br /><br />I might just play with the escape character in MaxL as well to see how it works.<br /><br />Good luck!<br /><br />Regards,<br /><br />Cameron LackpourCameron Lackpourhttps://www.blogger.com/profile/07701786303677521318noreply@blogger.comtag:blogger.com,1999:blog-7650953985627040991.post-66347911815335258542013-09-05T00:45:31.793-04:002013-09-05T00:45:31.793-04:00Hi Cameron,
Thanks for quick reply.
I did tried ...Hi Cameron,<br /><br />Thanks for quick reply.<br /><br />I did tried earlier using Sub Variables like what you explained.<br /><br />but the main issue is user need to set that variable for every run.<br /><br />I am thinking on following approach:<br /><br />Echo CurrYear and CurrMon to 2 diff txt files in a maxl <br /><br />and use batch file to read the variables echoed from mxl.<br /><br />and batch has various ways to rename the file.<br /><br />let me know inputs on this.<br /><br />P.S. : great to know that you worked with Josie.<br />It was my pleasure to work with Josie on few implementations<br /><br />Regards,<br />SachinAnonymoushttps://www.blogger.com/profile/14352233660384147040noreply@blogger.comtag:blogger.com,1999:blog-7650953985627040991.post-37258733210916369942013-09-04T18:00:57.426-04:002013-09-04T18:00:57.426-04:00Sachin,
This works:
dataexport "file" &...Sachin,<br /><br />This works:<br />dataexport "file" "," &TestFileName "#Mi" ;<br /><br />Where &TestFileName = "c:\temp\samplebasicoutput3.txt"<br /><br />The issue I think you are having is where you are trying to embed a variable within a variable. That doesn't seem to work. <br /><br />I tried combining two sub vars together and simply couldn't do it. Have you figured it out? The easy thing to do would be to just write to a single sub var all of the information you need. I know this is a workaround but if you are programmatically valuing &CurrYear and &CurrMon why couldn't you name the whole thing?<br /><br />Sorry I couldn't help and of course I'm all ears if you see the solution.<br /><br />Regards,<br /><br />Cameron Lackpour<br /><br />P.S. Do you know my buddy Josie? I see you work for the Indian arm of her firm.Cameron Lackpourhttps://www.blogger.com/profile/07701786303677521318noreply@blogger.comtag:blogger.com,1999:blog-7650953985627040991.post-80463253843451830862013-09-03T06:36:04.913-04:002013-09-03T06:36:04.913-04:00Hi Cameron,
great blog :)
I have a question :
I...Hi Cameron,<br /><br />great blog :)<br /><br />I have a question :<br /><br />I have a data export script which generates a txt file like below:<br /><br />DATAEXPORT "File" "," "D:\ESS-DataExport\GLEXP_ACT.txt" "";<br /><br />now the problem is I need to rename the exported file to something like below:<br />GLEXP_ACT_&CurrYear_&CurrMon.txt<br /><br />where &CurrYear,&CurrMon are sub-variables of essbase.<br /><br />please let me know if there is some workaround in script / MAxl or in a batch file.<br /><br />Regards,<br />SachinAnonymoushttps://www.blogger.com/profile/14352233660384147040noreply@blogger.comtag:blogger.com,1999:blog-7650953985627040991.post-39773324286964756042013-09-03T06:24:53.853-04:002013-09-03T06:24:53.853-04:00Hi Cameron,
great blog :)
I have a question :
I...Hi Cameron,<br /><br />great blog :)<br /><br />I have a question :<br /><br />I have a data export script which generates a txt file like below:<br /><br />DATAEXPORT "File" "," "D:\ESS-DataExport\GLEXP_ACT.txt" "";<br /><br />now the problem is I need to rename the exported file to something like below:<br />GLEXP_ACT_&CurrYear_&CurrMon.txt<br /><br />where &CurrYear,&CurrMon are sub-variables of essbase.<br /><br />please let me know if there is some workaround in script / MAxl or in a batch file.<br /><br />Regards,<br />Sachin Anonymoushttps://www.blogger.com/profile/14352233660384147040noreply@blogger.comtag:blogger.com,1999:blog-7650953985627040991.post-33812152605788999802012-12-18T18:54:40.229-05:002012-12-18T18:54:40.229-05:00Andre,
Try this:
alter database sample.basic add ...Andre,<br /><br />Try this:<br />alter database sample.basic add variable TestMe "\"Jan\":\"Dec\"" ;<br /><br />Just in case that is difficult to read, here's the string to set the variables the way you want:<br />"\"Jan\":\"Dec\"" <br /><br />When I set that in 11.1.2.2, I got the following from MaxL's display variable:<br />MAXL> display variable on database sample.basic ;<br /><br /> application database variable value<br /><br />+-------------------+-------------------+-------------------+-------------------<br /><br /> Sample Basic TestMe "Jan":"Dec"<br /><br />That is "Jan":"Dec" just as (I think) you wanted.<br /><br />Regards,<br /><br />Cameron LackpourCameron Lackpourhttps://www.blogger.com/profile/07701786303677521318noreply@blogger.comtag:blogger.com,1999:blog-7650953985627040991.post-80605473169839301432012-12-18T15:35:54.032-05:002012-12-18T15:35:54.032-05:00Hi,
I needed a variable V_YEAR_FROM_TO like this: ...Hi,<br />I needed a variable V_YEAR_FROM_TO like this: = "Y2010":Y2012"<br />for using it in a csc. <br />E.g. FIX (&V_YEAR_FROM_TO) ...<br />In EAS I was abel to set this variable value as above.<br />I was not able to make this work via MaxL. Any idea if and how to accomplish this?<br /><br />My work around was to set two variables like this: <br />V_YEAR_FROM = "Y2010" <br />V_YEAR_TO = "Y2012"<br />FIX (&V_YEAR_FROM:&V_YEAR_TO) ...<br />However if the one variable-variant would work - it would be great!<br /><br />Regards <br />Andre<br />Anonymousnoreply@blogger.com