Automating Span Accessory Processing

This section explains automating the Span Accessory after an audit file closes. For information on controlling when audit files close, see AuditTimer Utility.

When you use the Span Accessory to replicate a database, you must determine how often and when you want it to gather updates to the DMSII database. You could run the Span Accessory each time an audit file closes, or you could run it once per day.

Run Span Accessory at Audit File Close

The most convenient option is to run the Span Accessory with the DMSII copy audit WFL that the Accessroutines initiate when an audit file closes. (The advantage of this method is that the audit file is readily available. The disadvantage is that you don’t have much control over when it runs.) To run the Span Accessory each time an audit file closes, you must configure and run the Copy Audit program. For instructions, see Copy Audit Utility.

Once Per Day Alternative

Another option is to run the Span Accessory once per day (as part of batch processing) and have it process all audit files closed during that day. The advantage is that you have complete control over when the Span Accessory runs. The disadvantage is that the audit files the Span Accessory needs may have been already copied to tape and removed from disk. In this case, you would have to mount the audit tapes as the Span Accessory requests them.

For instance, if you prefer to run the Span Accessory only once a day during the nightly batch run, include the DATABridge WFL that runs Span Accessory in the nightly batch job stream.

Transaction Groups Across Audit Files

Regardless when you choose to run the Span Accessory, a transaction group might be started in one audit file and finished in the next. Since the end of an audit file is not necessarily a quiet point—transaction groups often start in one audit file and finish in another—the Span Accessory may need a previous audit file so that it can find the (partial) transaction group that didn’t finish until the next audit file.

For example, suppose the Span Accessory processes audit file 104. At the end of audit file 104 it sees the start of a transaction group that is carried over into audit file 105. Since the Span Accessory only returns completed transaction groups, it will not return this transaction group until audit 105 is available. At that time it will read the end of audit file 104 and continue on reading audit file 105.

Because of this, DATABridge requires at least two audit files to remain on disk to accommodate transactions that start in one audit file but end in another. To ensure that DATABridge has the audit files it needs, use the Copy Audit program (WFL/DATABRIDGE/COPYAUDIT). You can use the Copy Audit utility to keep a specified number of closed audit files on disk.