Set up and load into common storage the SMFLST00 listener user exit routine, which gains control only if the qualifier equals ENF37Q00.
* Load ENF Listen Exit (SMFLST00) into common storage and save address.
* SMFL00@ contains the address of the listener user exit routine that
* resides in common storage
.
.
ST R00,SMFL00@
*
* Issue LISTEN Request for SMF Event Code (Qualifier ENF37Q00)
L R02,SMFL00@
ENFREQ ACTION=LISTEN, -- Function +
CODE=ENFC37, -- Event Code +
EXIT=(R02), -- Exit Address +
QUAL=ENF37Q00, -- Qualifier Value +
QMASK=ALL, -- Qualifier Mask (Full Word) +
ESTBNME=THISMOD, -- Establisher Name +
EXITNME=SMFLST00, -- Exit Name +
DTOKEN=SMFL00T -- Returned Token Field
*
* Check the return code from ENFREQ - if not zero issue message
*
* - Local variables
DATAAREA DSECT
SMFL00@ DS A
SMFL00T DS F
ENFPTR DS A
*
* - Local constants
SMFLSTEN CSECT
DS 0F
ENFC37 EQU 37
THISMOD DC CL8'SMFLSTEN'
SMFLST00 DC CL8'SMFLST00'
*
* - External control blocks
CVT DSECT=YES
IEFENFCT
SMFLSTEN CSECT
IFAENF37
DATAAREA DSECT
IEFENFPM
LENODATA EQU *-DATAAREA
*
&SYSECT CSECT Control Section for Constants
ENF37Q00 DC X'80000000' SMF Active
ENF37Q01 DC X'40000000' SMF Terminated