Automating Span Processing

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

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

Run Span at Audit File Close

The most convenient option is to run Span 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 Span 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 Span 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 Span runs. The disadvantage is that the audit files Span needs may have been already copied to tape and removed from disk. In this case, you would have to mount the audit tapes as Span requests them.

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

Transaction Groups Across Audit Files

Regardless when you choose to run Span, 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—Span 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 Span 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 Span 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.