Little operator intervention is required to use the accounting facility. If the accounting files are on tape, the operator will be prompted to mount the tape and give the cuu of its drive. If they are on DASD, intervention is usually not required at all: the database manager simply opens ARIACC1, wherever it may be, and continues operation.
If you have defined two accounting files, the operator must issue the ALTACCT to close ARIACC1 and open ARIACC2 (or vise versa). If you are accounting to tape, the cuu for ARIACC1 becomes unassigned and available for other use, including for the alternate file; the operator is now prompted for the cuu of the tape drive of the alternate file. If you are accounting to DASD, the ALTACCT command does not require further operator action.
ALTACCT can be issued any number of times during a single run of the database manager. Each time, the file that is currently open is closed, and the alternate file is opened.
If the accounting file fills or a write error occurs, operator intervention is required. The operator is prompted as to whether the database manager should switch to an alternate file (if available), continue with accounting disabled, or end. If an alternate file has been defined, the operator should switch to it; if not, consider shutting down the database manager to avoid losing more accounting data. (In this situation, the accounting data in the buffer has already been lost.) The operator will need to know how to respond to this error message in advance. Other users must wait until the operator replies.
When the database manager ends (either normally or abnormally), it attempts to close the accounting file. If it cannot, some accounting data may be lost. Also, if the tape file cannot be closed, its tape mark is not written. In this situation, the operator should manually write a tape mark using the VSE WTM command. (For information on this command, see VSE/ESA System Control Statements.)
Whenever an accounting file is closed (either by shutting down the database manager or by switching to the alternate file), the operator should immediately process it, to reduce the risk of its being overlaid the next time the application server is started. If the file is being written to tape, overlaying can easily happen -- the database manager does not rewind the tape, but there is nothing to stop the operator from manually doing so. For DASD files, a simple job control error for VSAM-managed files can cause the error: specifying DISP=(KEEP) instead of DISP=(OLD,KEEP). For SAM-managed DASD files, it is even easier to overlay the file, as no SAM provisions exist for extending files. Thus, if the same job control is used two days in a row, the ARIACC1 file will certainly be overlaid. All of these problems can easily be avoided if the operator makes it a practice to process the file whenever it is closed.
For examples of operating procedures used in accounting, see the DB2 Server for VSE & VM Operation manual.