5 Replies Latest reply: May 15, 2014 10:03 AM by Grant Perkins RSS

    Updating Batch Files for V10

    Brittany _

      We just recently upgraded to V10, and have a number of batch files which are still written using the old format. So I am going through and adding in "/rep:", "/mod:", and "/exp:" to all of our batch files, which I thought was the only change that needed to be made. However, the newly-updated batch files still don't work, simply giving the not-very-explanitory error "Monarch application file has encountered a problem and needs to close." I've been trying to narrow down the problem, and I discovered that even the example from the help file doesn't work:

      monarch /rpt:"c:\program files\monarch\reports\classic.prn" /mod:"c:\program files\monarch\models\lesson10.mod" /exp:"c:\program files\monarch\export\classic.xls" /T[/INDENT]

       

      I've verified that the paths are correct, and that the report file and model file do exist there. By using only the first argument (monarch /rpt:"c:\program files\monarch\reports\classic.prn") I am able to open the report, but as soon as I include the model as well I just get the same error.

       

      This has me stumped. I'd appreciate any suggestions anyone may have!

        • Updating Batch Files for V10
          Grant Perkins

          Hmm.

           

          OK, you are right that the headline example in the Help file is not correct for V10. The examples later in the text are correct.

           

          V10 (and V9 for that matter) expect to see models as .xmod files, not .mod files.

           

          Now I don't know if this relates to your problem since you have not mentioned which Monarch version you had previously, but it might.

           

          If your existing model files are .mod you can use the Monarch Utility to convert them to .xmod versions.

           

          If that is not the problem we need to look in more detail at the batch file commands related to the additions for V10 compared to your previous version.

           

          The generic nature of the error message suggests, along with your identification that the model is the source of the problem, that this could be the source of the error. Alternatively that the model is not where the script is pointing to but I'm guessing that is more obvious and you have already checked the path carefully.

           

          Does this help move the problem on at all?

           

           

          Grant

           

           

          PS - I should have said above - WELCOME TO THE FORUM!

            • Updating Batch Files for V10
              Brittany _

              Thanks for your help and the welcome!

               

              If it helps, I was previously using Monarch V6. I tried to use the example from V10 section of the "Using Monarch Command Lines" help file with the "classic.prn" report and the "lesson11.[B]xmod[/B]" model to create a batch file, and the same error occurred. Then when I opened the sample report and xmod model manually in Monarch, the error occurred as soon as I opened the model. I tried opening a couple of other example reports and xmod models, with the same result. The reports all opened fine, but the model caused the program to crash.

               

              When I use our old mod[/B] files, I can open the reports and the models manually with no problem. But then I tried saving the models in the xmod format, and after I opened the report and the newly saved xmod model it crashed again.

               

              I can't get any models to open except our old mod ones when I try manually - and I can't get anything to work when I use a batch file. I would try reinstalling, but I've got the same thing happening on both my laptop and my desktop, so I don't think it's a problem with the installation.

               

              I have to say I'm not very familiar with Monarch and how it works. I've mostly taken on a number of reports that others have set up, and I haven't done much more than making small modifications to models that have already been set up.

                • Updating Batch Files for V10
                  Grant Perkins

                  Hi Brittany,

                   

                  I'm going to guess that your machines may need to updates from Microsoft for the version of Windows installed. Or possibly for the MS Office applications which also set standards for file use. From what you wrote I would be suspicious that you have some incompatibility for XML file handling. That is not uncommon in recent years as the XML developments have progressed.

                   

                  If you are in a corporate environment (sounds like you could be) I would get your IT people involved so they can assess what may be required but relate that to corporate policy.

                   

                  http://www.datawatch.com/_products/monarch_pro_tech.php[/URL]

                   

                  indicates the configuration required and is a good starting point I think. Now especially the requirement for

                   

                  .NET Framework 3 (preferably SP1 level); and

                   

                  Microsoft® Office XP/2003 or Microsoft Office XP/2003 Web Component for HTML Exports

                   

                  Life should be smoother with those installed if you don't already have them.

                   

                  If those are not the answer you may benefit from a call to Technical Support unless anyone else in the forum pops up with a solution  - it is not a problem I have seen so my ability to offer anything useful is somewhat limited here.

                   

                  HTH.

                   

                  Grant