1 Reply Latest reply: May 15, 2014 9:54 AM by Gareth Horton RSS

    Variable in Script

    mpicr _

      Hi,

       

      I have written a script to automatically to a report, model it and export it to a dbf file.  The problem is that this is a daily extract and the filename of the report changes each day.

       

      Below is my script:

      "c:program filesmonarchprogrammonarch" "d:cplaylcm010103.txt" "d:cplayfpbssmodelsdactpi.mod" "d:cplay

      ewfile.dbf" /t

       

      I need to change the report id (lmc010103) on the second statement.  For example the next day the report will be names lmc010203.  This is only one line.  I will have a number of lines as we are applying multiple models to the same report.  Is there anyway to prompt for data entry of the new report and it will reflect in the script?

       

      Thanks,

      Celia

        • Variable in Script
          Gareth Horton

          Hi,

           

          You would probably need to go to the OLE automation to get the flexibility you want as regards dynamic file naming.

           

          You can download the Monarch Programmers Guide for information on the COM/OLE/ActiveX methods and properties available.

           

          Many of the users on the forum use the OLE automation, so you may want to do a forum search to see the sorts of things they are doing.

           

          However, there may be a DOS batch file guru out ther who says otherwise!

           

          Gareth

           

          Originally posted by mpicr:

          Hi,

           

          I have written a script to automatically to a report, model it and export it to a dbf file.  The problem is that this is a daily extract and the filename of the report changes each day.

           

          Below is my script:

          "c:program filesmonarchprogrammonarch" "d:cplaylcm010103.txt" "d:cplayfpbssmodelsdactpi.mod" "d:cplay

          ewfile.dbf" /t

           

          I need to change the report id (lmc010103) on the second statement.  For example the next day the report will be names lmc010203.  This is only one line.  I will have a number of lines as we are applying multiple models to the same report.  Is there anyway to prompt for data entry of the new report and it will reflect in the script?

           

          Thanks,

          Celia /b[/quote]