11 Replies Latest reply: May 15, 2014 10:14 AM by KEVIN KENNEDY RSS

    problem with batch file

    Jean-Pierre Clermont

      I am trying to run this batch file it runs 12 Projects. they create one Excel file with 4 tabs. I am currentley running these 12 XPRJ in DataPump in one process. It works. We need to run these projects under our production Scheduler so that we put depencies on jobs run on an other platform where the the source system create the reports used as input.

       

      When I run the projects I only get one tab and not even complete. All projects start without waiting for the previous project to complete. the script looks like this:

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP1_SPS ECTRACT_FULL EXCEL.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\FCSR250DP_SEC PROC SUPPORT EXTRACT.xlsx" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP2_SPS EXTRACT SUMMARY FOR TOTAL.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\STEP1 EXPORT.txt" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP3.0_SPS EXTRACT APEND TOTAL TO FULL EXCEL.xprj" " D:\DataPump\09541 Securities Processing Support\Files Ready\FCSR250DP_SEC PROC SUPPORT EXTRACT.xlsx" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP3.1_SPS ECTRACT_FULL EXCEL REFORMATTED.xprj" "D:\DataPump\09541 Securities Processing Support\Projects\FCSR250DP_SEC PROC SUPPORT EXTRACT.xlsx" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP3.2_SPS ECTRACT_FULL EXCEL REFORMATTED.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\STEP3 EXPORT.txt" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP3.3_SPS EXTRACT APEND TOTAL TO FULL EXCEL.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\FCSR250DP_SEC PROC SUPPORT EXTRACT.xlsx"  /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP4_SPS ECTRACT_FULL EXCEL 2nd RC.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\FCSR250DP_SEC PROC SUPPORT EXTRACT.xlsx" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP5_SPS EXTRACT SUMMARY FOR TOTAL.xprj" " D:\DataPump\09541 Securities Processing Support\Files Ready\STEP2 EXPORT.txt" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP6_SPS EXTRACT APEND TOTAL TO FULL EXCEL 2nd RC.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\FCSR250DP_SEC PROC SUPPORT EXTRACT.xlsx" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP7_SPS ECTRACT_FULL EXCEL.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\FCSR250DP_SEC PROC SUPPORT EXTRACT.xlsx" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP8_SPS EXTRACT SUMMARY FOR TOTAL.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\STEP8 EXPORT.txt" /pxall

       

      "C:\program files\5761-MonarchPro10.5_[TA] (VMware ThinApp)\Monarch Pro.exe" "D:\DataPump\09541 Securities Processing Support\Projects\STEP9_SPS EXTRACT APEND TOTAL TO FULL EXCEL.xprj" "D:\DataPump\09541 Securities Processing Support\Files Ready\FCSR250DP_SEC PROC SUPPORT EXTRACT.xlsx" /pxall

         

      thank you

        • problem with batch file
          Olly Bond

          Hello Jean-Pierre and welcome,

           

          DataPump is the right solution for this sort of challenge - it's a pain to handle in batch. You should check out the free Batch File Generator from www.********************[/url] and experiment with that.

           

          One crude approach is to tell the batch file to wait for 10000 miliseconds in between each project, or you can use the COM commands documented in the Programmer's Guide. With these, you can build a script which triggers Monarch and waits for Monarch to return a signal that it's successfully executed the task.

           

          Hope this helps,

           

          Olly

            • problem with batch file
              Jean-Pierre Clermont

              Hi Olly

               

              We only have the help feature in Monarch and the Index does not contain COM command. i am assuming the there exist a programmers Guide that one can buy?

               

              Thanks

                • problem with batch file
                  Olly Bond

                  Dear Jean-Pierre,

                   

                  A google search suggests that this address might help: http://www.sys2000.de/dwws/sys2000/gew_anwender/a/monarch-update/Programmers_Guide.pdf[/url]

                   

                  Best wishes,

                   

                  Olly

                    • problem with batch file
                      RalphB _

                      Jean-Pierre, Ollie

                       

                      Here is a link to a newer version of the Programmers Guide that has some new commands like JetExportTable and JetExportSummary which is quite useful.  http://dlbconsultants.net/Documents/DatawatchMonarch/Monarch6ProgrammersGuide.pdf /url

                        • problem with batch file
                          Nigel Winton

                          Hello

                          I seem to remember from the days when I used batch files that Start/Wait at the beginning of a line made that line wait until the previous one had finished. Might work in your case.

                           

                          Nigel

                            • problem with batch file
                              KEVIN KENNEDY

                              I have a similar problem, may be related to the speed at which Monarch performs its duties. My batch job exports the table view from the model to an Access database, appending the data to an existing table in the database. After installing a new Windows 7 machine, I find that the table data exports but is given the filter name in the database. That is, it doesn't append to the existing table. Might slowing it down work?

                                • problem with batch file
                                  Olly Bond

                                  Hello K Kennedy,

                                   

                                  The name of the table to which Monarch appends the data can be defined in the project export. By default it will take the name of the active filter. Are you using a project export (like project.xprj /pxall in your batch file)?

                                   

                                  Best wishes,

                                   

                                  Olly

                                    • problem with batch file
                                      KEVIN KENNEDY

                                      In one batch job I used the project export, in another just the model.  The actual instruction is: "C:\Program Files (x86)\Monarch\Program\Monarch.exe" /rpt:"I:\accounting\Billing\Billing Extracts\Current-Reports\EFRPT.txt" /mod:"I:\accounting\Billing\Billing Extracts\Models\EF09_Billing.xmod" /exp:"I:\accounting\Billing\Billing Extracts\BillingExtracts.mdb" /t /expfileopt:"Add" /exptable:"tb_Extract" /exptableopt:"Append"

                                      In some batch jobs I export the table, in some the summary.

                                        • problem with batch file
                                          KEVIN KENNEDY

                                          Explored possible solutions: 1)run in safe mode, but couldn't print (the batch job runs an Access macro that prints); 2)set up partition to run the jobs under Windows XP (remote possibility, extra work involved in setup); 3)break up the batch jobs into pieces. Finally, remembered sleep.exe and ping command from some other project. Added ping for about 10 seconds after each Monarch job and that appears to work.

                                          • problem with batch file
                                            adonis _

                                            I normally use batch files and don't have problems, but if you are trying to make run 12 projects to create 1 spreadsheet with 4 tabs.  It may make sense to dump the data into MS Access as I do many times.  I can reconcile the data easier and then use the batch file to run the MS Access Macro   by using the path name of the location where the .mdb MS Access Database resides and the /x (name of macro)

                                             

                                             

                                             

                                            example: 

                                            In one batch job I used the project export, in another just the model.  The actual instruction is: "C:\Program Files (x86)\Monarch\Program\Monarch.exe" /rpt:"I:\accounting\Billing\Billing Extracts\Current-Reports\EFRPT.txt" /mod:"I:\accounting\Billing\Billing Extracts\Models\EF09_Billing.xmod" /exp:"I:\accounting\Billing\Billing Extracts\BillingExtracts.mdb" /t /expfileopt:"Add" /exptable:"tb_Extract" /exptableopt:"Append"

                                            In some batch jobs I export the table, in some the summary.[/QUOTE]