2 Replies Latest reply: May 15, 2014 9:52 AM by Data Kruncher RSS

    Created Date from Report File

    mattc _

      I am bringing in stock level information and exporting a stocklist.

       

      I would like to indicate to users how up-to-date the stocklist entries are, and therefore need a date from the original report.

       

      Unfortunately the report does not include any date or time information.

       

      Is it possible to access the DOS created date information from the report within a calculated field?

       

      Thanks,

       

      Matt

        • Created Date from Report File
          joey

          Just a thought...

           

          You could write a batch script to create a second file that contained only the date and time of the report.

           

          Then a second model could extract the date/time and export to a table.  You could use a lookup to add the date/time to the report, but you might need to add a dummy value to each table to match on for the lookup.

           

          One other approach might be to first create the date/time file, and open it in Monarch.  Then, open the report in the same session so the two files are concatanated (I think you might need to make sure the date/time file is the same record lenth as the report). You should be able to set up a template to capure the date/time.

          • Created Date from Report File
            Data Kruncher

            Matt,

             

            You might want to take a look at creating a runtime parameter calculated field. This will add a field to every row based on your input when you open the model.

             

            Alternatively, you can pass the model a value when running Monarch from the command line. If you named your calculated field ReportDate, and you wanted to give the model the current date then you'd run Monarch as follows:

            [font="courier"]monarch /rpt:"C:Your Report.txt" /mod:"C:Your Model File.xmod" /set:"ReportDate"="%date%"[/font][/quote]Similarly, you could run a VB Script to prompt you nicely for a value, which it would pass along to Monarch. Have a look at  [url="http://mails.datawatch.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=1;t=000843;p=1#000004"]this example script[/url].

             

            Kruncher