!!!HISTORY PURGE

The Purge History (UMHP) form is used to physically delete rows from the database that are no longer necessary or that are passed there legal requirement for holding on to. 
 
||Report Parameters||
|Trace Level|Optional, LOV Available\\When performing a trial calculation, you may specify the level of message that the calculation report should display. This field is used for troubleshooting purposes ‘Exceptions Only’ is the default value 

%%information This process could take a very long time to run depending on the number of tables setup and the amount of data in each table as sequential reads will be done to check each rows dates for qualifying to be deleted.%% 

!Based on Table Details ([IMTD]) 
Processes tables that are set up with either 
*Retained Periods (Numeric) and Period Type (Lexicon - see below) are both not null, or 
*Purge Date is not null 

%%information Purge Date will take precedence IF all three fields are filled in.  Thus if you have it set to normally delete rows that are older then 5 years BUT for a special run want to delete all rows prior to a specific date, you can.%% 

For tables that have a column called expiry or end date these columns are used for checking against the retention date.  For all other tables the change date column is used. 

Once an effective date table has been processed, its date adjustment procedure will be run to ensure continuity from the beginning to the end of time as we know it. 

!Period Types 
|01 Years|Specify the number of years to keep rows in the table.  For example:  retained periods was 2 and the system date is 15-JAN-2000 then any rows who's qualifying date is less than or equal to 15-JAN-1998 on the table being processed, will be deleted. 
|02 Months|Specify the number of months to keep rows in the table.  For example: retained periods was 6 and the system date is 15-JAN-2000 then any rows who's qualifying date is less than or equal to 15-JUL-1999 on the table being processed, will be deleted. 
|03 Weeks|Specify the number of weeks to keep rows in the table.  For example: retained periods was 1 and the system date is 15-JAN-2000 then any rows who's qualifying date is less than or equal to 08-JAN-2000 on the table being processed, will be deleted. 
|04 Days|Specify the number of days to keep rows in the table.  For example:  retained periods was 30 and the system date is 15-JAN-2000 then any rows who's qualifying date is less than or equal to 16-DEC-1999 on the table being processed, will be deleted. 

To run execute the function UMHP.  BACKUP the database BEFORE executing a History Purge. 

Include list of tables with possible recommendations. 


----
![Notes|Edit:Internal.UMHP] 	
[{InsertPage page='Internal.UMHP' default='Click to create a new notes page'}]