Use the following example to track any allocation requests greater than 500 mb. The event will be logged to a file named LOGSPACE allocated as //LOGSPACE DD SYSOUT=A in the DIF JCL.
DEFRULE SPACEREQ
IF &ENVIRON = (ALLOC*,*EXT*) &REQUEST_SIZE-M GT 500
THEN ISSUE WRITEMSG(MSGSPACE)
DEFMSG MSGSPACE
“*** &RUSER &JOBNAME &DSNAME REQUEST SPACE “ + “OF &REQUEST_SIZE-M MB” LOG(LOGSPACE,ONLY)