#### Stats On

Selecting the On option allows statistical information to go from your part program to the database. With stats on, you can send data to the stats file, transfer the information to a different directory, or store the information in a database application.

Any dimensions that follow a STATS/ON command and precede the next STATS/OFF command will be sent to the stats file or database upon execution of the next STATS/TRANSFER, STATS/UPDATE, or final command of the part program. With the STATS/ON command you can send the output information to multiple databases, even within the same part program.

Upon each execution of a part program that includes at least one STATS/ON command, PC-DMIS will ask whether or not to send the output information to any statistical database directories. This prompt can be bypassed by selecting the ALWAYS Update Database check box accessible from the Dimension tab of the Setup Options dialog box. See the "Setup Options: Dimension tab" topic in the "Setting Your Preferences" section.

Note: If you selected DataPage from Database Options, PC-DMIS automatically calls the DPUPDATE.exe executable to insert the data in the XSTATS11.tmp file into any selected DataPage directories.

Turning stats on inside a loop can result in slightly different output to the XSTATS11.tmp file for the dimension and feature IDs.

The Edit window command line for STATS ON reads:
STATS/ON,database option;
directory or DSN,
user ID, read lock, write lock, memory pages, user mode, variable name

database option = This toggle field indicates the database type to which the stats will be sent. This field can be DATAPAGE, DES, or SPC_DATABASE.

Directory or DSN = If the database option is DATAPAGE or DES, this string indicates the database directories to which the statistics will be sent. This must be a valid database directory. If the database option is SPC_DATABASE, this string indicates the DSN name of the database. This DSN name can be created in the ODBC options of the computer’s control panel. This DSN must be created to link to a valid SPC database.

user ID = This nine digit string indicates the port lock serial number. This field is only used for the DataPage database option.

read lock = This field indicates the maximum number of seconds PC-DMIS will wait for database access when reading. The default setting is 10 seconds. This field is only used for the DataPage database option.

write lock = This field indicates the maximum number of seconds PC-DMIS will wait for database access when writing. The default setting is 20 seconds. This field is only used for the DataPage database option.

memory pages = This field indicates the number of 4K pages to reserve for database tables when opening database. This option will affect performance. The minimum number that can be entered is 4 (also default). This field is only used for the DataPage database option.

user mode = This field indicates the user mode setting. Single user mode will only allow a single user access to the database. The value 0 (zero) signifies that single user mode is set. A value of 1 (one) signifies that multi-user mode is on. Single user mode will improve performance. This field is only used for the DataPage database option.

variable name = This field indicates the variable name setting. The value 0 (zero) indicates that dimension names will be displayed. A value of 1 (one) indicates that feature ID's will be displayed. This field is only used for the DataPage database option.