3 Replies Latest reply: May 15, 2014 9:52 AM by Grant Perkins RSS

    Batch Files (importing two files, exporting one)

    Ricardo _

      I was wondering if anyone knew how to write the command that enables you to import two different reports then apply the model.  Below is my script to import/export one report:

       

      C:Program FilesMonarchProgramMonarch.exe"

      "g:opsKimberlyTodays downloadfar150a.001"  "g:opsModelsfar150.mod" "G:OPSFAR150 DailyDaily Reportsfar150a daily.xls"

       

      Any thoughts would be greatly appreciated.

        • Batch Files (importing two files, exporting one)
          Ricardo _

          I was wondering if anyone knew how to write the command that enables you to import two different reports then apply the model.  Below is my script to import/export one report:

           

          C:Program FilesMonarchProgramMonarch.exe"

          "g:opsKimberlyTodays downloadfar150a.001"  "g:opsModelsfar150.mod" "G:OPSFAR150 DailyDaily Reportsfar150a daily.xls"

           

          Any thoughts would be greatly appreciated.

          • Batch Files (importing two files, exporting one)
            Grant Perkins

            Originally posted by Ricardo:

            I was wondering if anyone knew how to write the command that enables you to import two different reports then apply the model.   /b[/quote]Hi Ricardo and welcome to the forum.

             

            Have a look at Chapter 9 of the Help Documentation, especially the Overview section.

             

            Here is part of what it has to say

             

             

            The syntax for a simple Monarch command line is:

             

            Monarch /rpt:[Report File] | /mod:[Model File] /exp:[Export File] /Window

             

            For example:

            Opening a report and model and exporting from the table.

             

            monarch /rpt:"c:program filesmonarch eportsclassic.prn" /mod:"c:program filesmonarchmodelslesson10.mod" /exp:"c:program filesmonarchexportclassic.xls" /T

             

             

            Opening multiple reports, setting a runtime field called Test to True and exporting from the current summary.

            monarch /rpt:"c:program filesmonarch eportsclassic.prn" /rpt:"c:program filesmonarch eportsclassfeb.prn" /mod:"c:program filesmonarchmodels untime.mod" /set:"Test"="True" /exp:"c:program filesmonarchexportclassic.xls" /S /b

             

            So in terms of your script you just need to list the files one after the other (with full path names) and add the parameters to identify reports, model, export and so on. (By the way the examples above assume that Monarch.exe is known as Monarch and is in the Path. It may be safer to specify exctly where Monarch is with the full path in the command line.)

             

            As an alternative you could look at using a Project. Although opening multiple reports is not something I have been much involved with I believe the Project route would allow you to open both reports, save the project (which would then contain the reference to both reports) and then by simply opening the project you can run your analysis.

             

            Using a project greatly simplifies the command lines for the batch since the report(s) and model file to be used are already embedded in the project definition (but may be overridden if required).

             

            HTH

             

             

            Grant

            • Batch Files (importing two files, exporting one)
              Grant Perkins

              Originally posted by Ricardo:

              I was wondering if anyone knew how to write the command that enables you to import two different reports then apply the model.   /b[/quote]Hi Ricardo and welcome to the forum.

               

              Have a look at Chapter 9 of the Help Documentation, especially the Overview section.

               

              Here is part of what it has to say

               

               

              The syntax for a simple Monarch command line is:

               

              Monarch /rpt:[Report File] | /mod:[Model File] /exp:[Export File] /Window

               

              For example:

              Opening a report and model and exporting from the table.

               

              monarch /rpt:"c:program filesmonarch eportsclassic.prn" /mod:"c:program filesmonarchmodelslesson10.mod" /exp:"c:program filesmonarchexportclassic.xls" /T

               

               

              Opening multiple reports, setting a runtime field called Test to True and exporting from the current summary.

              monarch /rpt:"c:program filesmonarch eportsclassic.prn" /rpt:"c:program filesmonarch eportsclassfeb.prn" /mod:"c:program filesmonarchmodels untime.mod" /set:"Test"="True" /exp:"c:program filesmonarchexportclassic.xls" /S /b

               

              So in terms of your script you just need to list the files one after the other (with full path names) and add the parameters to identify reports, model, export and so on. (By the way the examples above assume that Monarch.exe is known as Monarch and is in the Path. It may be safer to specify exctly where Monarch is with the full path in the command line.)

               

              As an alternative you could look at using a Project. Although opening multiple reports is not something I have been much involved with I believe the Project route would allow you to open both reports, save the project (which would then contain the reference to both reports) and then by simply opening the project you can run your analysis.

               

              Using a project greatly simplifies the command lines for the batch since the report(s) and model file to be used are already embedded in the project definition (but may be overridden if required).

               

              HTH

               

               

              Grant