1 Reply Latest reply: May 15, 2014 9:52 AM by Data Kruncher RSS

    Running multiple models off of one file

    phillippaige _

      Hi Guys,

       

      I'm new to these forums but have been using monarch 6.01 for quite a while now (if only the company I work for would upgrade to give me new toys!)

       

      My problem is this - I have a massive file (>1gb) that I need to run 3 different models over to get 1 table and 2 different summaries out of. I do this from Acccess, passing a shell command for each run to DOS.

       

      This works fine but obviously takes a long time, most of said time is used by loading this file into memory 3 times.

       

      Is there a way I can tell monarch to hold the file in memory and just apply the 3 models one after the other, outputting the 3 results files I need.

       

      I can do this manually in Monarch and can see that it is a lot faster when I keep the underlying file open and just close and open each model in turn but I'm looking to do this in an automated fashoin.

       

      Many thanks in advance.

        • Running multiple models off of one file
          Data Kruncher

          Welcome to the forum Phillip.

           

          Your most effective solution will be in programming Monarch via its object model with VBA in Access.

           

          Download the  [url="http://www.datawatch.com/pdf/products/monarch/Monarch_8_Programmers_Guide.pdf"]Monarch Programmer's Guide[/url] from the Datawatch Support page.

           

          You'll want to learn how to create a Monarch object, open your report and models programmatically (SetReportFile and SetModelFile), and export your data (ExportTable and ExportSummary if you have the v6 Standard; JetExportTable and JetExportSummary if it's v6 Pro).

           

          Finally, be sure to clean up properly (CloseAllDocuments and Exit).

           

          You'll find plenty of programming examples by searching the past forum posts, but feel free to ask any questions you have if you get stuck. There are a number of us here who program Monarch via VBA who I'm sure will be glad to assist.

           

          Happy programming!

           

          Kruncher