SMFLSTAL - Sample ENF listener user exit routine
This ENF listener user exit routine processes all the qualifier values for the ENF event code.
By checking the qualifier value passed on the parmlist, this exit routine is able to determine which event occurred and process accordingly.
After checking the qualifier, this exit issues a message to the
console to tell the operator which of the following SMF Accounting
events occurred:
- ENF37C00
- 'SMF has completed initialization'
- ENF37C01
- 'SMF has terminated'
On entry to this listener user exit routine, register 1 points to the address of the input parmlist (mapped by the macro IFAENF37).
To initialize this exit routine you must do the following:
- Perform Entry Linkage
- Save input registers
- Get Working Storage
- Get the address of the input parm list and define DSECT mapping
*
* Get the input parameter structure and set DSECT basing
L E37@,0(R01) Get Input Parm Structure
USING ENF37,E37@ Set Parm Structure basing
*
After completing initialization, this exit routine determines which
event occurred and processes accordingly.
- If the qualifier indicates 'SMF has completed initialization'
then issue a message to the console.
* CLC ENF37QLF(4),ENF37Q00 BNE CHKQ01 WTO 'SMFLSTAL: SMF HAS COMPLETED INITIALIZATION' B MODTERM *
- If the qualifier indicates 'SMF has terminated' then issue a message
to the console.
* CHKQ01 EQU * CLC ENF37QLF(4),ENF37Q01 BNE CHKQ02 WTO 'SMFLSTAL: SMF HAS TERMINATED' B MODTERM * CHKQ02 EQU *
To end cleanly, the exit routine must do the following:
- Free Automatic Storage
- Restore Input Registers
- Perform Exit Linkage
- Return to caller