You can also send your statistical data to an XML file by using the XMLSTATS/ON command. This gives you access to the statistical data in a simple text format that you can then manually parse for use with third party tools. For information on supported methods and versions, see "Table of Supported Methods".
XMLSTATS/ON replaces the previous XML automation export utility named DataPageStats.exe that ships with DataPage+. You can then use the PcdmisXMLStatsToDatabase.exe utility in DataPage+ to monitor a directory and pull the data from the .xml files into the database. For information on how to do this, see DataPage+ documentation. For information on how this differs from DataPageStats.exe, see "How_XML_STATS_ON_Differs_from_DataPageStats.Exe:" below.
Using XMLSTATS/ON
To insert the XMLSTATS/ON command, type "XMLSTATS" and then press the Tab key on your keyboard in the Edit window's Command mode; or select the Insert | Statistics Command | XML Statistics menu item. This command has the following syntax:
XMLSTATS/<TOG1>,<Directory>
<TOG1> - This field toggles between either ON or OFF, letting you choose whether or not to export statistical data for measurement commands that follow this command.
<Directory> - This field takes a string (without quotes) as the directory pathway in which the file will be created. The default pathway is the directory where you store your measurement routines.
XMLSTATS/ON only writes the XML during execution. It writes the file to the specified directory and automatically generates the .xml file's name using this format:
<Measurement Routine>_<Day>-<Month>-<dd>-<YYYY>_<hh>_<mm>_<ss>.XML
<Measurement Routine> - The measurement routine name without the PRG extension.
<Day> - The name of day the measurement routine was executed in local time.
<Month> - The name of the month the measurement routine was executed in local time.
<dd> - The day of the month in two digit number format in local time.
<YYYY> - The year the measurement routine was executed displayed in four digit format in local time.
<hh> - The hour the measurement routine was executed (in 24-hour local time).
<mm> - The minute the measurement routine was executed in local time.
<ss> - The second the measurement routine was executed in local time.
Thus, a measurement routine named "Test.prg" executed on August 12, 2010 at exactly 2:40:15 PM local time, would have this file name: Test_Thursday_August-12-2010_14_40_15.XML
The XML file contains data for all commands that follow the XMLSTATS/ON until execution finishes or until execution encounters an XMLSTATS/OFF command. If execution encounters another XMLSTATS/ON command while writing to a file, it will write a closing </ExecutionTransaction> tag in the XML file and then allow the next XMLSTATS/ON command to write another opening <ExecutionTransaction> tag.
For example, suppose you had this pseudo measurement routine:
XMLStats/ON
Dimension1
XMLStats/OFF
Dimension2
XMLStats/ON
Dimension3
Following execution, PC-DMIS would generate a single file with two <ExecutionTransaction> tags. The first tag would contain Dimension1:
<ExecutionTransaction DateTime=”Sometimestamp”>
<XMLStats command data>
<Dimension1 Data>
</ExecutionTransaction>
The second file generated would contain Dimension3:
<ExecutionTransaction DateTime=”Sometimestamp”>
<XMLStats command data>
<Dimension3 Data>
</ExecutionTransaction>
How XML STATS/ON Differs from DataPageStats.Exe:
XMLSTATS/ON is faster than DataPageStats.exe.
It outputs everything DataPageStats.exe did but includes more.
You do not need to insert an external command at the end of your routine as you did when using DataPageStats.exe.
You can choose what data gets sent to the XML file by turning XMLSTATS commands on and off as needed.
XMLSTATS adds a time stamp within each <ExecutionTransaction> tag pair. In addition, the filename itself, as discussed above, is comprised of the part name and the time of execution.