Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ACCOUNTING exit (015)

&pagelevel(3)&pagelevel

An accounting exit routine that can be connected by systems support is called for every accounting record before the record is transferred to the accounting write task and written in the accounting file.

The exit routine can accept the accounting record unchanged, modify it, suppress it or create additional accounting records, which can be inserted before or after the current record in the accounting file.

The following information is transferred to the exit routine:

R1 = A(parameter area NASXIT)
R12 = A(TPR program manager)
R13 = A(save area of calling component)
R14 = A(indirect return)
R15 = A(exit routine)

The return code for the calling system component is transferred in the NASXRET field of the parameter area:

  • modify the accounting record (return code X’00’)

    The address of the original accounting record is transferred to the exit routine by way of the parameter list. The routine can make any changes to the record, provided the record length does not exceed 496 bytes. The layout of system accounting records is described in detail in the manual “Introduction to System Administration” [7].

  • suppress the accounting record (return code X’08’)

    Apart from setting return code X’08’, no action is required as a result of the exit routine.

  • insert an accounting record (return code X’00’)

    The records to be inserted must be written to the accounting file by the exit routine with the $NAREC macro before returning to the system. The record identifiers of customerspecific accounting records should begin with one of the letters X, Y or Z in order to avoid name conflicts with the system’s name identifiers.

  • add an accounting record (return code X’04’)

    The system writes the accounting record into the accounting file and then returns control to the exit routine. In this case the NASXRECA field of the parameter list contains no address. The exit routine can then add more accounting records with $NAREC. If control is returned to the system again, the return code is not interpreted. A third call is not provided for.

  • Excluding the possibility of recursion

    The accounting exit routine is also called for accounting records, which are written by the routine itself with $NAREC. A possible recursion must therefore be prevented within the exit routine.

DSECT

The NASXIT macro generates the layout of the exit parameter area as a DSECT or a data area.

The exit parameter area contains the standard header (including the return code) and the NASRECA field for the address of the accounting record which is to be added to the accounting file.

The exit routine’s return code must be added to the NASREXT field (“General Return Code”) of the parameter area.

         NASXIT MF=D
         MFCHK MF=D,                                                   C
               SUPPORT=(C,D),                                          C
               PREFIX=N,                                               C
               MACID=ASX,                                              C
               DMACID=ASX,                                             C
               DNAME=ASXIT
NASXIT   DSECT ,
               *,##### PREFIX=N, MACID=ASX #####
         #INTF INTNAME=$NASXIT,REFTYPE=REQUEST,INTCOMP=1
* PARAMETER LIST LAYOUT
NASXACC  FHDR MF=(C,NASX),EQUATES=NO
NASXACC  DS    0A
NASXFHE  DS    0XL8            0   GENERAL PARAMETER AREA HEADER
*
NASXIFID DS    0A              0   INTERFACE IDENTIFIER
NASXFCTU DS    AL2             0   FUNCTION UNIT NUMBER
*                                  BIT 15    HEADER FLAG BIT,
*                                  MUST BE RESET UNTIL FURTHER NOTICE
*                                  BIT 14-12 UNUSED, MUST BE RESET
*                                  BIT 11-0  REAL FUNCTION UNIT NUMBER
NASXFCT  DS    AL1             2   FUNCTION NUMBER
NASXFCTV DS    AL1             3   FUNCTION INTERFACE VERSION NUMBER
*
NASXRET  DS    0A              4   GENERAL RETURN CODE
NASXSRET DS    0AL2            4   SUB RETURN CODE
NASXSR2  DS    AL1             4   SUB RETURN CODE 2
NASXSR1  DS    AL1             5   SUB RETURN CODE 1
NASXMRET DS    0AL2            6   MAIN RETURN CODE
NASXMR2  DS    AL1             6   MAIN RETURN CODE 2
NASXMR1  DS    AL1             7   MAIN RETURN CODE 1
NASXFHL  EQU   8               8   GENERAL OPERAND LIST HEADER LENGTH
*
*
* FOLLOWING RETURN CODES MAY BE SET :
*
*    SC2   SC1   MAIN         MEANING
*     00    00   0000         WRITE ACC RECORD AND DO NOT RECALL EXIT
*     00    00   0004         WRITE ACC RECORD AND RECALL EXIT
*     00    00   0008         DO NOT WRITE ACC RECORD
*
* EQUATES FOR SUBCODE1 :
*
NASXS1OK EQU  X'00'                    NORMAL PROCESSING
*
* EQUATES FOR MAINCODE :
*
NASXMWR  EQU  X'00'                    WRITE ACC RECORD
NASXMWRR EQU  X'04'                    WRITE ACC RECORD AND RECALL
NASXMNWR EQU  X'08'                    DO NOT WRITE THE RECORD
* 
NASXRECA DS    A             ACC RECORD ADDRESS
*
* EQUATE FOR LENGTH OF PARAMETERLIST :
*
NASX#    EQU  *-NASXACC