Using TERMEXIT to control BMCHIST and statistics updates
TERMEXIT is the user exit for controlling BMCHIST and statistics functions in the UTILTERM phase.
TERMEXIT provides REORG PLUS with user-defined variables that allow you to dynamically control processing of updates to BMCHIST, BMCSTATS, real-time statistics, and UPDATEDB2STATS at execution time.
For information about the BMCHIST and TERMEXIT command options, see Syntax-of-the-REORG-command. For information about the corresponding installation options, see REORG-PLUS-installation-options.
Within this exit, you can also use SQL to maintain your BMCHIST tables. The example in the following figure deletes all rows over 90 days old.
Example maintaining BMCHIST tables using SQL
DELETE FROM STRIP(BMC_TBCREATOR_BMCHIST)||.||BMC_TBNAME_BMCHIST
WHERE DBNAME = BMC_DBNAME
AND SPNAME = BMC_TSIX
AND UTILID = BMC_UTILID
AND DATE < ( CURRENT DATE - 90 DAYS );
COMMIT;
WHERE DBNAME = BMC_DBNAME
AND SPNAME = BMC_TSIX
AND UTILID = BMC_UTILID
AND DATE < ( CURRENT DATE - 90 DAYS );
COMMIT;
Related topic
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*