Running Macros Weekly
Generating the Preventive Maintenance Report
Executing the macros in the above order provides a Preventive Maintenance Report listing summary information followed by detailed information for the week. Used in this manner, the macros should be executed with ‘Date-7’ as the FromDate and ‘Date-1’ as the ToDate. For example, the following BTEQ statement provides a report listing all the events that occurred on the database during the specified time period (that is, the last 7 days excluding the date of today) with the number of occurrences:
Exec EventCount (Date-7, Date-1);
If you have access to a client user ID or access to the system console, you can write a BTEQ script in the above syntax. Then, you can run the script on a weekly basis without changing the date parameter.