Need Windows bat script help

Apparently I've been in Unix land a little too long, because I'm trying to do something in a windows .bat scirpt that i know is possible in a Kornshell. I just don't know for sure if it is possible on windows.
I am trying to assign a variable the value of a command. More specifically, I'm trying to assign the variable as the contents of a file.
So in a Kornshell I would do something like this...
DBS_NAME=$(cat DBS_NAME.txt)
echo $DBS_NAME
So I have gotten this far in the .bat script...
set DBS_NAME=type DBS_NAME.txt
echo %DBS_NAME%
but everything I've tried to resolve the "type" command (to display the contents of the file) is not working, I keep ending up with the text of what is after "set DBS_NAME=" on the output.
Does anybody know if this is possible in windows?
TIA,
Robert

The echo is there to display the value of DBS_NAME for testing.
I'm actually trying to read this in so I can pass it to a maxl command line, and instead of the variable passing the App.DBname (contents of the file), it is passing 'type C:\DBS_NAME.txt' to my maxl script, and so it is failing.
Here is the test bat script...
set DB=type C:\DBS_NAME.txt
essmsh C:\Test.mxl %DB%
and its maxl output below...
(I overwrote the user, password and server below)
Notice that it is failing on the word 'type'. This should be the App.DB being passed (the contents of the file), but instead it is still only passing the text of the command.
MAXL> login <user> <password> on <server>;
OK/INFO - 1051034 - Logging in user [000694098].
OK/INFO - 1051035 - Last login on Friday, November 05, 2010 2:08:03 PM.
OK/INFO - 1241001 - Logged in to Essbase.
MAXL> display variable on database type;
ERROR - 1242021 - (1) Syntax error near ['type'].
MaxL Shell completed

Similar Messages

  • Need a bat script to check Server status remotly.

    Hi,
    I need bat script to check server status remotly (Ping) for multiple servers. It should generate a txt file for result.
    Thanks.

    Hi Ravi,
    To ping multiple computers and generate report cia cmd, please refer to the script below, the "fnm" is computer name list and the "lnm" is the result, and you can save the script below as .bat file:
    @echo off
    set fnm=d:\test1\computers.txt
    set lnm=d:\test1\ping.txt
    if exist %fnm% goto Label1
    echo.
    echo Cannot find %fnm%
    echo.
    Pause
    goto :eof
    :Label1
    echo PingTest STARTED on %date% at %time% > %lnm%
    echo ================================================= >> %lnm%
    echo.
    for /f %%i in (%fnm%) do call :Sub %%i
    echo.
    echo ================================================= >> %lnm%
    echo PingTest ENDED on %date% at %time% >> %lnm%
    echo ... now exiting
    goto :eof
    :Sub
    echo Testing %1
    set state=alive
    ping -n 1 %1
    if errorlevel 1 set state=dead
    echo %1 is %state% >> %lnm%
    Refer to:
    Explain the Batch script to ping multiple computers
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • ** Is it possible to run a windows .bat script job from ODI between server?

    Hello Friends,
    We have ODI 10.1.3.5 on a Win2003 Server.
    Have a windows Batch script job .bat(this is a related to a different program - DRM) on a different Windows 2003 server...is it possible to execute .bat job thru ODI between servers?
    Appreciate your suggestions...
    Thanks.

    Hi AJ,
    Here are more details:
    Server-A: ODI Server (Win2003)
    Server-B: Oracle DRM Server (Win2003)
    Server-C: ODI scheduler agent is installed (Linux)
    We have a .bat batch script job on Server-B which we are planning to run from Server-A (as part of the ODI package execution flow)
    This .bat job exports the DRM hierarchy data to a table that ODI uses to process next steps.
    So, you are suggesting to install ODI agent on Server-B? If we do that...not sure if there be issues if we have to run the package with other scenario's (interfaces/Procedures) that refer agent isntalled in Server-C??
    Any feedbacks are appreciated!!
    Thanks

  • Need some more scripting help

    [I'll be posting this over on the Google Group forum too.]
    File is here: https://acrobat.com/#d=m7zuQYiUoFrtz5isD7rErQ
    Form is a series of tables that can expand and contract their respective rows by clicking a button in the header - tables start out collapsed and filler can open the appropriate tables. I'm using + and - values on the buttons to check what they should do - they call a script object which handles looping through the table rows, etc (thanks Niall!).
    I also have similar loops set up on prePrint and docReady (on the form1 root) events so that the tables collapse down to only used rows for printing or after the form is saved and re-opened.
    I'm having a few issues that I'm having trouble figuring out. I'm thinking some of the problems might even have to do with which events I'm using but not sure.
    Resetting the value of the +/- button in the header rows:
    Unless a table is expanded and has rows that are empty showing I want the button caption to be a +. I've been trying to explicitly set this as part of the different loops but seem to be having issues.
    Problem with repeating header button caption:
    If a table breaks across a page, the button in the repeated header row doesn't reflect the caption of the button in the parent header row. I kind-of fixed this with some code from Paul Guerett which sets the caption based on xfa.layout.pageSpan and it works but if you click the repeated button again to collapse the table the main button caption doesn't update (should change back to a +), unless you click on the main button.
    Related to this one is when the file is saved and re-opened table headers that had been repeated show random multiple time (2-5 generally).
    I also ran into some trouble with Reader when using Unicode characters for the button caption. Instead of +/- I was trying to use \u25BC and \u25B2 (down and up triangles) but Reader seemed to choke on it.
    This form is ready to go except for these couple of issues that I can't seem to track down.

    Hi Jono,
    Here is the form with a few mods: https://acrobat.com/#d=rXwdoCcfDC0pWQz-39KWjg
    In relation to the repeating headers, I think the main problem is that the HeaderRow was set to repeat in the Object > Binding tab. I have deselected this. However you would need to test. I have seen this before and to get over it I have wrapped the header in a separate subform. I don't want to do it here because of the scripting, but see how you get on.
    On the reset button, I have included a execEvent for the docReady event in the form1 node. This resets the "+".
    Where a table spans more than one page (generating another "-" button). I have included another line to reset the original button back to "+":
    xfa.resolveNode("HeaderRow[0].Button1.caption.value.#text").value = "+";
    This seems to work.
    I haven't looked at the unicodes. I would stick with the +/-, as these are self evident and you will be less likely to have compatibility problems.
    Form looks good!
    Good luck,
    Niall

  • I  need a Java script  help

    I need a javascript that I can put a list of picture urls in and it
    will be
    timed to fade into the next picture. I don't want just a rotating one
    it
    must fade into the next picture to look good. Very easy project

    I don't think you can do fading and rotating of
    images in Javascript anyway.Sounds like one of those godawful Flash thingsthat
    websites make you watch before you can get to the
    useful stuff.I hate those.
    My company's website is rife with them. System
    testing is a major PITA. I can only imagine how
    frustrating it must be for a customer who doesn't
    have broadband.My company also loads up the corporate site with this trash. We don't employ any web developers, so they brought in some "consultants" to do it for us.
    Every time I have to watch it, I'm reminded of the four straight years I went without a pay raise. Turns my stomach.

  • Need a little scripting help

    Can someone post some basic code that shows how to export from a form on a web page and how the shell script reads that variable in.
    I'm trying to take a value called TYPE and post that to the shell version of the transfer script. I don't know how to relate that TYPE variable to something the shell can understand.
    Many thanks.
    Dave

    Thanks try67. . .  but I probably did not pose the question correctly. When I inserted the script I got the discounted value when I really wanted the value minus the discount.... in this case it would have been $100.00. (1 Die LIne @ $115.00 - $15.00 = $100.00).

  • How do I delete movies from iTunes library? I have moved them to the iCloud and now only seem to have the option to hide the icon in iCloud.  I am sure I chose poorly at the 'keep file' window.  Please help. My Brain hurts- 18   movies need to go-.

    How do I delete movies from iTunes library? I have moved them to the iCloud and now only seem to have the option to hide the icon in iCloud.  I am sure I chose poorly at the 'keep file' window.  Please help. My Brain hurts… 18 plus movies need to go….  Thank you.

    Instead of removing the music from the cloud or the iTunes library why not shuffle your music using a Smart Playlist which excludes the holiday music, or tracks that are not checked. For example, use this very simple Smart Playlist:

  • Lightroom 4.4 keeps crashing saying "Lightroom encountered an error when reading from its preview cache and needs to quit" please help. I've tried reinstalling it and everything  Windows 8.1

    Lightroom 4.4 keeps crashing saying "Lightroom encountered an error when reading from its preview cache and needs to quit" please help. I've tried reinstalling it and everything  Windows 8.1

    I assume you know where your catalogue file (the lrcat file) is located. In the same folder is a previews lrdata folder which you should delete or rename in Explorer, then start LR again.
    If I've made incorrect assumptions above, sorry, and we'll go back over it from the start.
    John

  • Report Script Help Needed - Data Extract

    Hi,
    I have a cube with 11 dims: Account, Period, Resource, Facility, SSSS, CCCC, Activity, Years, Version, Scenario, Charges
    I need a report script that will extract data for a certain year and scenario only. I have not written a report script in a long time and have the following thus far. However it's not extracting data that I know exists. Can anyone help? Thanks is advance. This runs but I just get a blank screen or file....
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    // This report script extracts data from cube
    "FY11"
    {DECIMAL 4}
    {NAMEWIDTH 25}
    {SUPCOMMAS}
    {SUPBRACKETS}
    {SUPPAGEHEADING}
    {NOINDENTGEN}
    {SUPMISSINGROWS}
    {SUPZEROROWS}
    {TABDELIMIT}
    {SUPFEED}
    {ROWREPEAT}
    "JAN"
    "FEB"
    "MAR"
    //"APR"
    //"MAY"
    //"JUN"
    //"JUL"
    //"AUG"
    //"SEP"
    //"OCT"
    //"NOV"
    //"DEC"
    "BUDGET"
    // This is the members of the CCCC dimension to extract
    // This is the members or the ACCOUNT dimension to extract
    !

    Hello -
    You can try/modify the code below and see if this works -
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    { SUPMISSINGROWS }
    { SUPZEROROWS }
    { SUPFEED, SUPBRACKETS, SUPCOMMAS }
    { NOINDENTGEN }
    { DECIMAL 4}
    { NAMEWIDTH 30 }
    { ROWREPEAT }
    { TABDELIMIT }
    {MISSINGTEXT "-" }
    <PAGE ("Scenario", "Resource", "Facility" ,"SSSS", "Activity", "Version", "Charges")
    "Budget"
    "Resource"
    "Facility"
    "SSSS"
    "Activity"
    "Version"
    "Charges"
    <COLUMN ("Year","Period")
    "FY11"
    "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
    <ROW ("Account", "CCCC")
    <LINK (<DESCENDANTS ("ACCOUNT") AND <LEV("ACCOUNT",0))
    <LINK (<DESCENDANTS ("RT9_CCCC") AND <LEV("CCCC",0))
    Here you may want to change teh combination in the Page dimensions for eg -
    I know for Scenario you want Budget
    But for Version should it be "Version" or may be "Working" Or "Final" or any other version dimension member ...?
    Same way modify the dimension memebres for other dimensions.
    Regards
    Edited by: Rosi on Aug 24, 2009 10:01 AM
    Edited by: Rosi on Aug 24, 2009 10:02 AM

  • Report Script Help Needed

    Hi,
    I have not written one in years and am having trouble with a fairly simple one (I think). Was wondering if you could take a look. Anyways we have 11 dimensions which may make this impossible due to performance. I basically need a report script to perform a data extract. Data requirements for each dimension would be:
    Scenario: Budget
    Version: Final
    CCCC: Tot_CCCC (Rollup)
    SCCC: Tot_SCCC (Rollup)
    Charge_Type: Charge_Type_Total (Rollup)
    Resource: NU_RESC (Rollup)
    SAU_CAU_Facility: Zero level members of "NU_Consolidated"
    Account: Zero level members of "TOTCO_FERC"
    Activity: Zero level members of "NU_Actv"
    Years: Children of "YEARS"
    Periods: Jan to Dec only
    Report format would suppress the PAGE thus Budget and Final would not appear.
    Was also hoping to somehow suppress CCCC, SCCC, Charge_Type and Resource(Not sure if possible).
    Thus format would look something like this tab delimited:
    Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
    SAU_CAU_Facility Account Activity Year 100 200 100 100 010 100 200 300 100 100 100 100
    Here is what I have so far. I have not been able to get it to return any results even though I have loaded one row of fake data. Does anything jump out at you as to what I'm doing wrong? Appreciate any help you may have as I'm really stuck as it's been years since I have tried this.
    //ESS_LOCALE English_UnitedStates.Latin1@Binary
    // This report script extracts data from NUMaster
    <SUPSHARE
    {DECIMAL 4}
    {NAMEWIDTH 25}
    {SUPCOMMAS}
    {SUPBRACKETS}
    {SUPPAGEHEADING}
    {NOINDENTGEN}
    {SUPMISSINGROWS}
    {SUPZEROROWS}
    {TABDELIMIT}
    {SUPFEED}
    {ROWREPEAT}
    <PAGE ("SCENARIO", "VERSION")
    "BUDGET" "FINAL"
    <COLUMN ("PERIOD")
    "JAN"
    "FEB"
    "MAR"
    "APR"
    "MAY"
    "JUN"
    "JUL"
    "AUG"
    "SEP"
    "OCT"
    "NOV"
    "DEC"
    <ROW ("RESOURCE_LOCATION", "SCCC", "CCCC", "VERSION", "CHARGE_TYPE", "SCENARIO", "SAU_CAU_FACILITY", "ACCOUNT", "ACTIVITY", "YEARS")
    <DIMBOTTOM "SAU_CAU_Facility"
    <DIMBOTTOM "ACCOUNT"
    <DIMBOTTOM "ACTIVITY"
    <DIMBOTTOM "YEARS"
    "TOT_CCCC"
    "TOT_SCCC"
    "CHARGE_TYPE_TOTAL"
    "NU_RESC"
    // Limits the members within the specified dimensions to the correct zero level members of the specified rollup
    <LINK (<DESCENDANTS ("NU_CONSOLIDATED") AND <LEV("SAU_CAU_Facility",0))
    <LINK (<DESCENDANTS ("TOTCO_FERC") AND <LEV("ACCOUNT",0))
    <LINK (<DESCENDANTS ("NU_Actv") AND <LEV("ACTIVITY",0))
    Thanks,
    SAm

    One thing that may help - it looks like you're using both <DIMBOTTOM and <LINK for three of your dimensions.
    <DIMBOTTOM "SAU_CAU_Facility"
    <DIMBOTTOM "ACCOUNT"
    <DIMBOTTOM "ACTIVITY"
    You should just need the <LINK and not the <DIMBOTTOM. <DIMBOTTOM's can really kill report script performance.
    Whenever I do these, I try to start small, and then open the report script up to more and more members to see what's affecting performance. I'd start with one year, one facility, one activity, one account, etc. Then slowly add in the full member specifications you want.
    Hope this helps,
    - Jake

  • Need  Bookmark creation script for Paragraph style. Anybody can help me pl?

    Need  Bookmark creation script for Paragraph style. Anybody can help me pl?

    Hi hasvi,
    I wrote a similar script which creates a bookmark on each page in the "main" text frame at the begining of the frame (the 1st insertion point). Here I attached the script and a couple of sample documents: before and after. It's more complex than what you want but you can use it as a starting point. In fact, you have to find a certain paragraph style, loop through every found item and insert a bookmark, say, at the beginning of the found text.
    The dialog box
    Bookmarks added
    Regards,
    Kas

  • I have been trying to put some of my music and artwork, on youtube. Youtube says you need an encoder to upload music. But the problem is the only encoders available are for windows. Please help, thank you

    I have been trying to put some of my music and artwork, on youtube. Youtube says you need an encoder to upload music. But the problem is the only encoders available are for windows. Please help, thank you

    The formats YouTube supports can be found here:
    http://www.google.com/support/youtube/bin/answer.py?answer=55744
    Since YouTube supports AAC, the file format iTunes uses by default, it's probable you don't need any sort of converter.
    If you continue to have problems with uploading to YouTube, I'd suggest you ask for assistance in their forums:
    http://www.google.com/support/forum/p/youtube?hl=en
    Regards.

  • Math homework software won't load onto Macbook! Errgh, need Windows, HELP!

    I LOVE MY MACBOOK. I HATE ALGEBRA. But the software that we need in order to do our assignments is not compatible with Safari, I guess... needs Windows, but I don't understand. What is Boot Camp? What is Parallels? Is there a special Mac version of Windows? I don't want to put Windows on here, but I have to pass this class!
    Please help. I need an economical and non-techie way to fix my problem.
    Thanks a ton in advance.

    *"What is Boot Camp?"*
    *http://www.apple.com/bootcamp allows you to boot your computer into Windows*
    *"What is Parallels?"*
    http://www.parallels.com/en/download/desktop/ Run Windows from within Mac OS.
    *"Is there a special Mac version of Windows?"*
    No. Although Boot Camp requires XP SP2 or later
    *"I don't want to put Windows on here,"*
    Try CrossoverMac from codeweavers.com
    If then your Math app still doesn't work then you'll need to install Windows.

  • Serious, Pro level Illustrator Scripting help needed

    I need a pretty robust script and I am willing to pay for it. I am sorry if soliciting like that is a against forum rules, I will find out if my post gets, deleted/locked. I am just serious about this need for a script.
    I am not sure if this is possible in Illustrator, but I really hope so. I need a script that will read the information from the x,y position and width x height in the Transform Palette of any selected object (or objects would be even better), including all the the different reference point values, and then write discrete user selected info; based on a easy to use panel of check marks, radio buttons or whatever, to a text field a set number of pixel offset from the upper left corner of the object bounds.
    I would be happy to explain further if this is the correct place for this type of discussion.
    If this is not the right place, my humblest apologies but perhaps someone could turn me on to a better place?
    Thanks in advance for any help!

    This does not sound like a big task.
    Here is a script I use every day.
    displays the Width and Height below each selected Item or group.
    have a go and let me know if this is kinda what you are thinking.
    from there we can work out how you want everything displayed
    var doc = app.activeDocument;
    var sel = doc.selection;
    var TOmm = 2.83466796875;
    Dim(sel);
    function Dim(objs) {
        for (var i=objs.length-1;i>=0;i--) { // loop through your collection of objects
            var bounds = objs[i].visibleBounds; // Get visibal bounds, which are only visable bounds in some cases...
            var b1 = bounds[0] /TOmm;
            var b2 = bounds[1] /TOmm;
            var b3 = bounds[2] /TOmm;
            var b4 = bounds[3] /TOmm;
            var W = Math.abs(b3-b1).toFixed(1);
            var H = Math.abs(b4-b2).toFixed(1);
            var txt = doc.textFrames.add(); // Create the text frame
            txt.contents = "Size:  "+ H + " x " +W + " mm W";  // Adds contents to frame
            txt.position = [objs[i].left,objs[i].top - objs[i].height - 20]; // Positions the frame
    This example ignores clipping paths and measures everything, including what is clipped.

  • HELP I NEED A JAVA SCRIPT

    I NEED A JAVA SCRIPT that chance the crouser on my webpage
    my webpage is made whit flash
    so i want i want a script that chance the cruser(mouse-pointer)

    <script language="JavaScript">
    alert("WRONG FORUM, Suggest you do a google search....");
    </script>

Maybe you are looking for

  • Back up from iCloud

    I had my iphone 5s stolen on the 17th Jan (not sure what iOS it was up to?) stupidly I hadn't backed up on icloud since the 6th Jan, still, not too long passed so was hopefully little was lost. Before getting my new phone I logged into icloud to run

  • Applications wont open

    All my purchased applications wont open any more. I recently changed from a laptop using vista to a new macbook and my applications wont sync from phone to itunes on mac. I can still open all apps that came with phone i am on ver 2.2 software help pl

  • Problem in sending SMS via using java communication API

    I need to send SMS via my sony ericsson Z530i. It is connected to the com5 port of my system. I got the following code. import java.io.*; import java.util.BitSet; import javax.comm.*; import java.lang.*; public class SerialToGsm {     InputStream in;

  • Report not running after moving to new environment

    I have a Business View designed in a test environment and reports written against that view. The view has been exported & imported to a production environment, with other views added to that environment. The report has been copied across & pointed to

  • Navigation Using Script?

    Hi all, I'm looking for advice on how the experts do this kind of thing. (Link below) The text navigation next to the guy in the middle of the flash piece has a nice bounce to it (both the text and the arrow glow). I can create this using a movie in