Example 1

The following procedure is an example of how to configure AuditTimer to force an audit file close between 5:00 p.m. and 7:00 p.m. each evening.

  1. Using CANDE or another editor, open the sample AuditTimer parameter file (DATA/AUDITTIMER/SAMPLE/CONTROL).
  2. Enter the following values for day, time, and interval:

    SUNDAY 5 PM 2 HOURS

    SUNDAY 7:10 PM 24 HOURS

    MONDAY 5 PM 2 HOURS

    MONDAY 7:10 PM 24 HOURS

    TUESDAY 5 PM 2 HOURS

    TUESDAY 7:10 PM 24 HOURS

    WEDNESDAY 5 PM 2 HOURS

    WEDNESDAY 7:10 PM 24 HOURS

    THURSDAY 5 PM 2 HOURS

    THURSDAY 7:10 PM 24 HOURS

    FRIDAY 5 PM 2 HOURS

    FRIDAY 7:10 PM 24 HOURS

    SATURDAY 5 PM 2 HOURS

    SATURDAY 7:10 PM 24 HOURS

  3. Save the sample parameter file as follows:

    DATA/AUDITTIMER/databasename/CONTROL

    where databasename is the name of the database for which you will be automatically closing the audit files.

  4. Run AuditTimer as follows:

    START WFL/DATABRIDGE/AUDITTIMER ("databasename");

AuditTimer will determine the parameter file entry corresponding to the current time and then compute the age of the current audit file. If the current audit file is too old, it will force an audit switch. Then AuditTimer will compute the next time that an audit file could possibly be too old and re-queues itself for that time.

For example, if AuditTimer starts running Monday at 5:30 p.m., it will ensure that the current audit file is not older than two hours. If it is 90 minutes old, AuditTimer will re-queue itself to run at 6:00 p.m.

On the other hand, if the current audit file is only 10 minutes old, it wouldn't be two hours old until 7:20 p.m., which is after the next parameter file entry (MONDAY 7:10 PM 24 HOURS) takes effect. Since audit files can be 24 hours old during that entry, the audit file created at 5:20 p.m. won’t be too old until 5:20 p.m. the next day, which is after the next parameter file entry (TUESDAY 5 PM 2 HOURS) takes effect. Therefore AuditTimer will re-queue itself for Tuesday at 5:00 p.m.