Using TERMEXIT to control BMCHIST and statistics updates
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;
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*