Command Line Processing .bat file works in Monarch Pro but not Monarch 14

Altair Forum User
Altair Forum User
Altair Employee
edited November 2017 in Community Q&A

I have a .bat file that pulls in a RPT and applies a Model (xmod) and exports the data to a .csv file.  It works perfectly in Monarch Pro but since upgrading to Monarch 14, the export is not working. I do have the license for command line processing.  Has anyone else encountered this and if so what was the resolution?  Thanks!

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Hi Lisa,

     

    The big difference between Monarch Pro and Monarch 14 is that the Monarch command line executable was separated from the interactive Monarch exe.  So your .bat file should be using C:\Program Files\Datawatch Monarch 14\Monarch.exe.  Other than that, the parameters and structure hasn't changed.

     

    Would it be possible to see your .bat file command that calls Monarch and export to csv?

     

    Regards,

    Mela

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Hi Lisa,

     

    The big difference between Monarch Pro and Monarch 14 is that the Monarch command line executable was separated from the interactive Monarch exe.  So your .bat file should be using C:\Program Files\Datawatch Monarch 14\Monarch.exe.  Other than that, the parameters and structure hasn't changed.

     

    Would it be possible to see your .bat file command that calls Monarch and export to csv?

     

    Regards,

    Mela

    The bat file script is below:

     

    setlocal enabledelayedexpansion

     

    "C:\Program Files (x86)\Datawatch Monarch 14\Monarch.exe" /rpt: "C:\Temp\Monarch 14 test\PRA1020.RPT" /mod: "C:\Temp\Monarch 14 test\PRA1020.xmod" /exp: "C:\Temp\Monarch 14 test\PRA1020.csv" /T

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    The bat file script is below:

     

    setlocal enabledelayedexpansion

     

    "C:\Program Files (x86)\Datawatch Monarch 14\Monarch.exe" /rpt: "C:\Temp\Monarch 14 test\PRA1020.RPT" /mod: "C:\Temp\Monarch 14 test\PRA1020.xmod" /exp: "C:\Temp\Monarch 14 test\PRA1020.csv" /T

    Hi Lisa,

        When you run your batch file from the cmd, do you get this error: - "This application is not licensed for command line operations"?

    Thanks,

    Anu

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Hi Lisa,

        When you run your batch file from the cmd, do you get this error: - "This application is not licensed for command line operations"?

    Thanks,

    Anu

    No.  There is no error at all produced.  The command prompt displays the script and then displays the following two lines and closes

     

    Monarch.exe Version 14.2.0.7331

    Copyright c Datawatch Corporation 1996-2017. All rights reserved.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    No.  There is no error at all produced.  The command prompt displays the script and then displays the following two lines and closes

     

    Monarch.exe Version 14.2.0.7331

    Copyright c Datawatch Corporation 1996-2017. All rights reserved.

    Can you try saving this model as a dprj (project) file in which you have specified the report, the name of the output csv and just try running this in cmd please:

    "C:\Program Files (x86)\Datawatch Monarch 14\Monarch.exe" /prj:"C:\Temp\Monarch 14 test\PRA1020.dprj" /pxall

    I assumed that we name the dprj file as PRA1020.

     

    Please let me know what happens.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Can you try saving this model as a dprj (project) file in which you have specified the report, the name of the output csv and just try running this in cmd please:

    "C:\Program Files (x86)\Datawatch Monarch 14\Monarch.exe" /prj:"C:\Temp\Monarch 14 test\PRA1020.dprj" /pxall

    I assumed that we name the dprj file as PRA1020.

     

    Please let me know what happens.

    It behaves the same way after making the change you recommended.  The output is not generated at all. The command prompt simply displays the script and the following two lines:

     

    Monarch.exe Version 14.2.0.7331

    Copyright c Datawatch Corporation 1996-2017. All rights reserved.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    It behaves the same way after making the change you recommended.  The output is not generated at all. The command prompt simply displays the script and the following two lines:

     

    Monarch.exe Version 14.2.0.7331

    Copyright c Datawatch Corporation 1996-2017. All rights reserved.

    What if you tried:  "C:\Program Files (x86)\Datawatch Monarch 14\DWMonarch.exe" /prj:"C:\Temp\Monarch 14 test\PRA1020.dprj" /pxall

    One last try.  Otherwise, sorry I couldn't help you.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    What if you tried:  "C:\Program Files (x86)\Datawatch Monarch 14\DWMonarch.exe" /prj:"C:\Temp\Monarch 14 test\PRA1020.dprj" /pxall

    One last try.  Otherwise, sorry I couldn't help you.

    remove a space after each command parameter:

    "C:\Program Files (x86)\Datawatch Monarch 14\Monarch.exe"  /rpt:"C:\Temp\Monarch 14 test\PRA1020.RPT" /mod:"C:\Temp\Monarch 14 test\PRA1020.xmod" /exp:"C:\Temp\Monarch 14 test\PRA1020.csv" /T

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    remove a space after each command parameter:

    "C:\Program Files (x86)\Datawatch Monarch 14\Monarch.exe"  /rpt:"C:\Temp\Monarch 14 test\PRA1020.RPT" /mod:"C:\Temp\Monarch 14 test\PRA1020.xmod" /exp:"C:\Temp\Monarch 14 test\PRA1020.csv" /T

    Great minds think alike!  I have been testing all morning and removed the spaces after each command parameter and it worked.  Thanks everyone for your feedback.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Great minds think alike!  I have been testing all morning and removed the spaces after each command parameter and it worked.  Thanks everyone for your feedback.

    Glad you got this working.  I have also been trying to run my batch that was working on version 9 in the new Monarch Version 14 stand alone desktop version.  But, it says I need license to run this in command line.

    Do you run this batch file in a Monarch 14 stand alone or  Server?

    Thanks,

    Anu

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Glad you got this working.  I have also been trying to run my batch that was working on version 9 in the new Monarch Version 14 stand alone desktop version.  But, it says I need license to run this in command line.

    Do you run this batch file in a Monarch 14 stand alone or  Server?

    Thanks,

    Anu

    Monarch 14 stand alone but we bought the license for command line processing.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Monarch 14 stand alone but we bought the license for command line processing.

    Oh.  So you spent that extra $25,000 to get this feature.

    Thank you for the information.

    Have a good day!

    Anu

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2017

    Great minds think alike!  I have been testing all morning and removed the spaces after each command parameter and it worked.  Thanks everyone for your feedback.

    The credit should go to the Datawatch support engineer, Edrun Yuen