Auditing Cleanup (JALExtLimpiarAudit) |
Top Previous Next |
You add this extension to a “Process” type procedure over the audit file, so you can process its records and generate two new files from the current data. See the “CleanAudit” procedure in the example program. You must ask for a “cut date” in the process window, and start the process “paused”. In the File Schematic, you must add the two auxiliary audit files mentioned in the global extension, identical to the main one. One will be the “new” one, and the other the “backup” one. All the records from the beginning of the audit file to the cut date (excluded) will be copied to the “backup” audit file, while the records from the cut date on, will be copied to the “new” audit file. When the process finishes it erases the current audit file, and replace it with the “new” one, so you end up with a fresh packed current audit file and a fresh packed one containing old audit data (That can be inspected as well). The whole copy process occurs inside a transaction.
This process cannot be executed while the system is in use, as exclusive access is required to access the audit files. You have to do it when the system is off-line after hours. Also, keep in mind that depending on the amount of records, it may take a long time to complete the process.
|