Preparing the AVS Accounting Module

 PI 

AVS accounting inputs three types of accounting records to the AGWACI module, which is an installation-wide exit. AVS generates the following accounting records (see Generating AVS Accounting Information for more information):
Initialization
Generated during AVS initialization and contains information about when AVS started.
Conversation
Generated while a conversation is active and contains information about conversations established through AVS.
Termination
Generated during AVS termination and contains information about when AVS ended.

AGWACI ASSEMBLE uses the DIAGNOSE code X'4C' subcode X'0010' instruction to write these preformatted 70 byte input accounting records to a CP spool file. See z/VM: CP Programming Services for more information on the DIAGNOSE instruction. The status of the DIAGNOSE code is returned to the caller in register 15. AGWACI returns this status when it returns to AVS.

The AGWACI ASSEMBLE file is written in assembler language and contains internal DSECTs of the accounting data passed to it. You may change the destination or format of the accounting records by coding your own version of AGWACI. (To reassemble the file, use the CMS ASSEMBLE command or VMFASM.) Refer to the IBM®-supplied routine as a model. Consideration should be given to the execution time of this module because it runs inline with AGW routines. Excessive times may cause data loss or conversations to time-out.

On entry to, and return from, AGWACI, the registers must have the following values:

Access Register Contents
Entry 1 Address of the pointer to the accounting information.
13 Pointer to the standard register save area.
14 Return address.
15 Entry point address.
Exit 14 Return address
15 Set to 0 by the DIAGNOSE instruction; AVS accounting will not be initialized if a nonzero value is returned.

 PI end