How to handle statistic records and reports of no longer active tasks which don't have a timestamp4

Document ID : KB000089989
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
How to handle statistic records and reports of no longer active tasks which don't have a timestamp4
Resolution:
Detailed Description and Symptoms
If a customer does not use our standard statements to remove activities from the activities window the ah_timestamp and the ah_status does not reflect the status of the task.
As well the rh_timestamp is not set.

As a result the reorganisation process is not able to remove the records and they will stay in the database for ever.

Some customers recognize these records with the mostly rather old start time stamps and wonder why they are still in the system. 

Solution

There are two options to deal with situations like that:

 A) Recommended: 

The timestamps 'AH_TIMESTAMP4' and 'RH_TIMESTAMP4' are set to the current date and the 'AH_STATUS' is set ti 1850 (ENDED_CANCEL)

 B) Not Recommended but some customers prefer this option:

The records (A* and R*) are removed from the database. In this case information about statistics and the related reports are lost which might not be acceptable for some customers.

The scripts for both options are attached.